InterLAB tools · EAN · Code 128 · camera

Barcode generator and scanner

Type a number and an EAN-13, EAN-8, UPC-A or Code 128 symbol is built instantly, with the check digit, GS1 prefix and a contrast check. Build a printable label sheet or read codes with the camera and from photos.

Free, no sign-up

EAN-13 · EAN-8 · UPC-A · Code 128

Everything runs in your browser: codes are built and read on this device, camera frames and photos are never sent anywhere. Only the settings and the generator value are saved; the scan history lives until you close the tab.

Generator

4601234567893

4601234567893

Check digit 3 — added

Size with quiet zones: 37.29 × 26.08 mm

GS1 prefix: 460–469 — GS1 Russia This is the GS1 member organisation that issued the company number, not the country of origin.

Symbology

12 digits — the check digit is added; 13 — the check digit is verified. Spaces and dashes are fine.

0.33 mm

100% magnification of the nominal 0.33 mm

22.85 mm

4 px per module — actual module 0.339 mm

Colours
Scanner contrast: A (100%) WCAG contrast 21:1

Scanners use red light: red and orange bars are almost invisible to them. Estimated from the on-screen colours against ISO/IEC 15416 thresholds, not a print measurement.

How the tool works

  1. Generator

    The symbol is rebuilt on every keystroke. For EAN/UPC you can enter the number without the check digit — it is computed and highlighted; with it — it is verified, and a typo tells you which digit is expected.

  2. Size and colours

    Module width in millimetres (for EAN with the magnification of the nominal 0.33 mm), bar height, quiet zones, human-readable digits, colours. SVG uses physical millimetres; PNG uses a whole number of pixels per module at the chosen dpi, and the actual module width is shown.

  3. Self-check

    After every change the finished symbol is rasterised and read by the built-in decoder using the red channel — the way a red-light scanner sees it. Red bars on white fail the self-check.

  4. Label sheet

    Up to 240 values → A4 or Letter sheets: print from the browser (including “Save as PDF”) and a ZIP with individual label and sheet SVGs. Invalid lines are listed by number and skipped.

  5. Scanner

    Phone or laptop camera: the system BarcodeDetector where the browser has it (Chrome on Android, macOS), otherwise the built-in decoder. Photos by drag and drop, paste or file picker. Results with check-digit validation, history, copy and CSV.

Standards and formulas

EAN-13, EAN-8 and UPC-A — ISO/IEC 15420 and the GS1 General Specifications (section 5.2); Code 128 — ISO/IEC 15417; the contrast estimate uses ISO/IEC 15416 thresholds.

EAN-13 (GTIN-13)

Data
12 digits + check
Check
mod 10, 3-1
Quiet zones
11X left, 7X right
Module X / height
0.33 (0.264–0.66) / 22.85 mm

EAN-8 (GTIN-8)

Data
7 digits + check
Check
mod 10, 3-1
Quiet zones
7X / 7X
Module X / height
0.33 / 18.23 mm

UPC-A (GTIN-12)

Data
11 digits + check
Check
mod 10, 3-1
Quiet zones
9X / 9X
Module X / height
0.33 / 22.85 mm

Code 128

Data
ASCII 0–127, up to 80 characters
Check
mod 103
Quiet zones
10X / 10X
Module X / height
0.19–1 mm / ≥ 15% of width, ≥ 6.35 mm
Supported symbologies
  • GS1 check digit: digits from right to left are weighted 3, 1, 3, 1…; check = (10 − sum mod 10) mod 10. Example: 400638133393 → 1.
  • Code 128: check symbol = (start value + Σ position × symbol value) mod 103. Example “Wikipedia”: Start B (104) … → 88.
  • Code 128 sets are chosen by dynamic programming: set C packs two digits per symbol, CODE A/B/C and SHIFT cost one symbol each — the shortest encoding wins.
  • Scanner contrast: SC = background reflectance − bar reflectance in the red channel (≈ 660 nm); A ≥ 70%, B ≥ 55%, C ≥ 40%, D ≥ 20%. It is an estimate from on-screen colours, not a verifier measurement of a print.

0

Sets for digits 2–7
L L L L L L

1

Sets for digits 2–7
L L G L G G

2

Sets for digits 2–7
L L G G L G

3

Sets for digits 2–7
L L G G G L

4

Sets for digits 2–7
L G L L G G

5

Sets for digits 2–7
L G G L L G

6

Sets for digits 2–7
L G G G L L

7

Sets for digits 2–7
L G L G L G

8

Sets for digits 2–7
L G L G G L

9

Sets for digits 2–7
L G G L G L
EAN-13: the first digit is encoded by the left-half parity

GS1 prefixes

The first three digits of an EAN-13 are the prefix of the GS1 organisation that issued the company number. It is not the country of origin: a product with prefix 460–469 can be made anywhere, and an importer may register its own number in its own country.

000–019

GS1 organisation / purpose
GS1 US (USA and Canada)

020–029

GS1 organisation / purpose
Restricted in-store numbering (variable-measure items)

040–049

GS1 organisation / purpose
Restricted company-internal numbering

050–059

GS1 organisation / purpose
GS1 US — coupons

200–299

GS1 organisation / purpose
Restricted in-store numbering (variable-measure items)

300–379

GS1 organisation / purpose
GS1 France

400–440

GS1 organisation / purpose
GS1 Germany

450–459

GS1 organisation / purpose
GS1 Japan

460–469

GS1 organisation / purpose
GS1 Russia

470

GS1 organisation / purpose
GS1 Kyrgyzstan

471

GS1 organisation / purpose
GS1 Taiwan

474

GS1 organisation / purpose
GS1 Estonia

475

GS1 organisation / purpose
GS1 Latvia

476

GS1 organisation / purpose
GS1 Azerbaijan

477

GS1 organisation / purpose
GS1 Lithuania

478

GS1 organisation / purpose
GS1 Uzbekistan

481

GS1 organisation / purpose
GS1 Belarus

482

GS1 organisation / purpose
GS1 Ukraine

484

GS1 organisation / purpose
GS1 Moldova

485

GS1 organisation / purpose
GS1 Armenia

486

GS1 organisation / purpose
GS1 Georgia

487

GS1 organisation / purpose
GS1 Kazakhstan

488

GS1 organisation / purpose
GS1 Tajikistan

489

GS1 organisation / purpose
GS1 Hong Kong

500–509

GS1 organisation / purpose
GS1 UK

690–699

GS1 organisation / purpose
GS1 China

760–769

GS1 organisation / purpose
GS1 Switzerland

800–839

GS1 organisation / purpose
GS1 Italy

840–849

GS1 organisation / purpose
GS1 Spain

870–879

GS1 organisation / purpose
GS1 Netherlands

930–939

GS1 organisation / purpose
GS1 Australia

977

GS1 organisation / purpose
Serial publications (ISSN)

978–979

GS1 organisation / purpose
Books (ISBN, “Bookland”)

980

GS1 organisation / purpose
Refund receipts

981–984

GS1 organisation / purpose
Common-currency coupons

990–999

GS1 organisation / purpose
Coupons
Common GS1 prefixes — the issuing organisation, not the country of origin

How codes are read without libraries

  1. Scanlines

    Brightness is sampled along parallel lines at 12 angles (photos) or 4 angles (camera); large photos are also scaled to 1600 and 800 px.

  2. Binarisation

    A local threshold halfway between the minimum and maximum in a window; bar edges with sub-pixel accuracy. Two variants: with sharpening (for blurred narrow bars) and without.

  3. Matching

    Bar-width groups are compared with the symbology patterns within a tolerance; guard patterns, quiet zones and the check digit are verified. Every line is read both ways — the code may be upside down.

  4. Voting

    A reading is accepted when at least two lines (or two consecutive camera frames) agree. This rejects chance matches.

Sheet layouts and browser support

A4 · 3×8 (70×37 mm)

Labels per sheet
24
Label, mm
70 × 37
Left/top margin, mm
0 / 0.5

A4 · 3×7 (63.5×38.1 mm)

Labels per sheet
21
Label, mm
63.5 × 38.1
Left/top margin, mm
7.2 / 15.15

A4 · 2×7 (99.1×38.1 mm)

Labels per sheet
14
Label, mm
99.1 × 38.1
Left/top margin, mm
4.65 / 15.15

A4 · 4×10 (48.5×25.4 mm)

Labels per sheet
40
Label, mm
48.5 × 25.4
Left/top margin, mm
8 / 21.5

Letter · 3×10 (2⅝×1 in)

Labels per sheet
30
Label, mm
66.675 × 25.4
Left/top margin, mm
4.76 / 12.7
Label sheet layouts
  • The generator, label sheets and photo recognition work in any modern browser.
  • The camera needs HTTPS and getUserMedia: Chrome, Edge, Firefox, Safari (iOS 14.3+). The torch works only where the camera reports it (usually Chrome on Android).
  • The system BarcodeDetector exists in Chrome on Android and macOS; Chrome/Edge on Windows and Firefox lack it — the built-in decoder takes over (QR cannot be read without the system detector).
  • Printing: choose 100% scale and no margins in the print dialog, otherwise labels shift.

Limitations

  • Symbologies: EAN-13, EAN-8, UPC-A, Code 128. No GS1-128 with application identifiers, ITF-14, Data Matrix, EAN-2/EAN-5 add-ons. QR is a separate tool, “QR code generator”.
  • Code 128 encodes ASCII only: Cyrillic and emoji are not supported by the standard.
  • The built-in decoder reads one or two codes per frame, best when they are flat, sharp and large; badly curved, crumpled or tiny codes in photos may not be read.
  • The contrast estimate and self-check use on-screen colours; print quality (ink spread, printer resolution, label material) is checked with a test print or a verifier.

Privacy

  • Codes are built and read on your device; camera frames and photos never leave the browser and are not uploaded anywhere.
  • Only the settings and the generator value are kept in localStorage; the scan history lives in this tab's memory and is gone after a reload.
  • The camera starts only on your click and stops when you switch to another tool section or hide the page.
  • Analytics receives only the fact of an export or a read and its format — never the values.
  • The result reaches us only if you send a request yourself and keep the “Attach the result” box ticked — the form shows exactly what will be sent. Files and images are never sent with a request.

Related tools

All tools · 40
Tell us about your task — we'll review your request and get back to you

Need inventory with a barcode scanner?

InterLAB builds warehouse and retail systems: barcode receiving, labels, integrations with POS and marketplaces. The first conversation about your task is free.

  • The first short conversation is free — we choose the format
  • NDA — yours or ours
  • Pricing after a brief and an agreed scope

Please do not send passwords, access keys or source code through this form — we will agree a safe way to share access separately.

By clicking the button you agree to the processing of your personal data.