Skip to content
OGE logoOGE

Barcode

oge-barcode draws QR codes, Code 128 and EAN-13 barcodes; oge-barcode-scanner reads them from the camera or an image file.

The encoders are the suite's own — no dependency, no canvas: a QR code picks its mode, the smallest version and the lowest-penalty mask, and was checked against an independent reader across modes, levels, masks and sizes up to version 40. Symbols are crisp SVG named by their value. Reading uses the browser's BarcodeDetector where it exists; elsewhere you pass a decoder.

QR Code 128 EAN-13 SVG camera

Generate

Type a value and pick a symbology. A value the symbology cannot hold — letters in an EAN-13, a character outside printable ASCII in Code 128 — shows a message instead of a symbol.

value type scale download()

Labels

EAN-13 adds its own check digit; a QR code at level H still reads with 30 % of it scuffed; bars take a height and a colour (keep them dark on light).

ean13 errorCorrection barHeight color
4006381333931SHIP-000123

Scan

Start opens the camera and reads a frame every 250 ms — a value read again within a moment counts once; “Scan an image” reads a file. A polite status line announces each read, and says so when the browser has no reader or the camera is refused.

oge-barcode-scanner detected decoder

Nothing read yet