Barcode Generator
Pick a symbology, type your data and download a print-ready barcode — check digits computed and validated on this device.
Do it offline:$ zint --barcode=20 --data 'GLASSWING-001' -o code128.png
How to use it
- Choose a symbology — linear codes in one picker group, matrix codes in the other; every reference-table row has a Use button too.
- Type the data. Validation is live: wrong characters are named with their position, and the chip under the field shows the GTIN check digit it computed or verified.
- Press Generate barcode. The first press downloads the renderer — about 105 KB, stated up front — after that every edit re-renders live.
- Download the SVG for print work, or the PNG for documents and chats.
Pick one of 13 symbologies, type your data and download a print-ready barcode as crisp SVG or PNG. Check digits for the GTIN family — EAN, UPC, ITF-14 — are computed and verified on this device, with typed refusals. The renderer downloads once, on your first generate — about 105 KB compressed — and every symbology in the reference table renders from the same form.
How it works
A linear barcode encodes data in the widths of its bars and spaces. In Code 128, every character occupies eleven fixed modules split into three bars and three spaces; the symbol wraps your data between a start pattern, a mod-103 check the encoder computes internally, and a stop pattern. Scanners read width ratios, so a cleanly scaled export scans where a squashed screenshot fails.
Retail numbers carry their own arithmetic. GS1's mod-10 rule walks the digits right to left with weights 3, 1, 3, 1…: for the EAN-13 body 400638133393 the weighted sum is 89, the next multiple of ten is 90, so the check digit is 1 and the full number is 4006381333931. This page runs that computation — 12 digits get the 1 appended; 13 get verified, both digits printed on a mismatch.
Rendering is done by bwip-js — the BWIPP barcode writer cross-compiled to JavaScript, MIT, credited below — inside a background worker that loads nothing until your first generate. Data passes this page's own validation before it reaches the renderer, so refusals arrive typed. The SVG is the source of truth; the PNG is that vector rasterized in this tab, four times the vector size on white — scanners need the light backdrop.
Examples
GLASSWING-001Code 128 · 13 characters · mod-103 symbol check computed by the encoderAn internal SKU is Code 128's home turf. Its check character lives inside the bars — computed automatically, never shown in the text line.
400638133393EAN-13 · normalized to 4006381333931 · check digit 1 (computed)Twelve digits in, thirteen out: the appended mod-10 digit is the same 1 walked through above.
03600029145UPC-A · normalized to 036000291452 · check digit 2 (computed)US retail's GTIN-12. Paste all twelve digits instead and the final one is verified.
0001234567890ITF-14 · normalized to 00012345678905 · check digit 5 (computed)The carton format: a GTIN-14 in Interleaved 2 of 5 bars with a bearer frame, built for corrugate print runs.
Every example on this page is executed against the same engine that powers the tool, on every build.
Gotchas worth knowing
EAN-13 and UPC-A share one arithmetic
UPC-A is an EAN-13 whose leading digit is 0 — same mod-10 check, same bar family. North American tills have read both since the 2005 sunrise date, so worldwide products usually carry one EAN-13.
The SVG carries no quiet zone — your layout provides it
The artifact is exactly the bars (plus ITF-14's bearer frame): a Code 128 of 178 modules at scale 3 measures precisely 534 units, margin-free. GS1 requires clear light space either side of the bars.
Print size is a module-width rule
GS1 sets minimum X-dimensions — the narrowest bar's width — per application, with 0.264 mm the retail floor. Scale the export rather than shrinking it in a layout tool, and test a real scan first.
The GS1-128 check is syntax-shaped, on purpose
The engine's warning states its scope: AI syntax is checked by shape only — this is not a full GS1 AI validator; an unallocated AI still fails at render time. The one semantic rule it owns is AI (01), whose 14-digit GTIN gets the real mod-10 verification.
Interleaved 2 of 5 encodes digit pairs
ITF bars interleave two digits per bar-space group, so the family only encodes even counts — that is why ITF-14 is fixed at fourteen. Odd counts other than the 13-digit body refuse with the pairing rule spelled out — never a guessed padding zero.
Common errors
Check digit mismatch — the last digit says 0, but the first 12 digits compute 1. Fix the digit, or paste the number without it and it is added for you.- This capture is 4006381333930 — the worked example with a corrupted final digit. Printing both digits shows whether the typo sits in the body or the check.
Code 39 cannot encode "l" (position 2). Allowed: 0–9, A–Z (capitals), space and - . $ / + %.- Code 39's 43-character set has no lowercase. The refusal names the first offender and its position — uppercase the pasted SKU and it renders.
ITF encodes digits in pairs, so an odd count of 5 cannot interleave — ITF-14 takes exactly 13 digits (the check digit is added) or 14.- Five digits cannot form interleaved pairs at all, so the message teaches the parity law instead of a bare length complaint. Thirteen digits are the shortcut — the GTIN-14 completes itself.
FAQ
Is this a real GS1 number?
No — this tool does not issue GS1 numbers. GS1 member organizations license GTINs; this page draws the graphic for a number you already own, or for internal codes of your own scheme.
Should I download the SVG or the PNG for print?
SVG for anything professionally printed — exact bar geometry, sharp at any size. The PNG suits documents and chats, already rastered on white so scanners keep their contrast.
Do I need a quiet zone around the barcode?
Yes. Scanners find a symbol by the light margins around it, and the export contains bars only — your layout provides the clear space. GS1's guidance scales with module width; leave more room than looks necessary.
Which symbology should I pick?
Retail products scan EAN-13 or UPC-A; cartons take ITF-14; logistics labels with batch data use GS1-128; internal SKUs fit Code 128; tiny parts get Data Matrix; tickets favor Aztec; IDs use PDF417. The reference table pairs each with its rules.