Barcode Generator — Code 128, EAN-13, UPC-A, ITF, Code 39, Codabar
Create a scannable 1-D barcode in seconds. Pick a symbology, type the value, and download a print-ready PNG or vector SVG. GS1 check digits are calculated and verified for you. Encoded entirely in your browser — no signup, no upload, no watermark.
How it works
A 1-D barcode encodes a short string into a sequence of bars and spaces whose widths the scanner measures and decodes back to the original text. Each symbology — Code 128, EAN-13, UPC-A, ITF, Code 39, Codabar — defines its own alphabet, character widths, start and stop patterns, and (for retail formats) a check digit so a single misread digit can be detected and rejected. This generator validates your input against the rules of the symbology you chose, then hands it to the bwip-js encoder, which implements BWIPP — Barcode Writer in Pure PostScript, the reference implementation used by the symbology committees.
Symbology rules summarised.
- Code 128 (ISO/IEC 15417) — variable length, all 128 ASCII code points. Three code sets (A, B, C) cover upper-case + controls, full ASCII, and double-digit shorthand. The encoder picks the densest set for you and inserts the modulo-103 check character.
- EAN-13 (ISO/IEC 15420) — exactly 13 digits. Twelve data digits + GS1 mod-10 check digit. First three digits are the country prefix (e.g. 590 = Poland, 200–299 = internal use). Used outside North America for retail.
- UPC-A (ISO/IEC 15420) — exactly 12 digits. Eleven data digits + GS1 mod-10 check digit. The standard for retail in the United States and Canada.
- ITF / Interleaved 2 of 5 (ISO/IEC 16390) — digits only, length must be even. Used on outer cartons (ITF-14 is the most common length) because the dense interleaved pattern fits more digits in less width than competing numeric symbologies.
- Code 39 (ISO/IEC 16388) — uppercase letters, digits, and the symbols
- . $ / + %plus space. The asset-tag standard. Self-checking, but a Mod-43 check digit can be added for extra integrity. - Codabar (AIM USS-Codabar) — digits and the symbols
- $ : / . +, framed at both ends by one of the start / stop letters A, B, C, or D. Used by US libraries and FedEx airbills.
GS1 mod-10 check digit. EAN-13 and UPC-A both use the same algorithm published in GS1 General Specifications §7.9.1: starting from the rightmost data digit, multiply by 3 and 1 alternately, sum the products, take the result modulo 10, and the check digit is (10 − sum mod 10) mod 10. The page calculates this digit independently from the rendered symbol, then compares it against the digit baked into the barcode by bwip-js. If they ever disagreed, the "Verified" status tile would flip — a regression alarm that costs nothing to run.
Rendering.The barcode is drawn at three pixels per module width (the "X-dimension"), then exported as either a PNG raster suitable for print at retail sizes or a single-path SVG vector that scales to any label dimension without aliasing. Colours are user-controllable; bars must remain materially darker than the background for reliable scanning.
Worked examples
Frequently asked questions
Sources & references
- ISO/IEC 15417 — Code 128 bar code symbology specification
- ISO/IEC 15420 — EAN/UPC bar code symbology specification
- ISO/IEC 16388 — Code 39 bar code symbology specification
- ISO/IEC 16390 — Interleaved 2 of 5 bar code symbology specification
- GS1 General Specifications — mod-10 check-digit algorithm (§7.9.1)
- BWIPP — Barcode Writer in Pure PostScript (reference encoder)
- GS1 Sri Lanka — issuing authority for SL company prefixes
Symbology rules and the GS1 mod-10 algorithm above were last cross-checked against the cited primary sources on 2026-05-11. If a reader app ever decodes a barcode from this page incorrectly, please email me with the exact input — that is the kind of fix we ship within 24 hours.
Related tools
Comments & feedback
Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.
Found a bug, a misread symbol, or want another barcode format?
Email me at [email protected] — most fixes ship within 24 hours.