A barcode generator for retail, logistics and 2D codes
This barcode generator creates standards-compliant 1D and 2D barcodes in your browser using bwip-js, a JavaScript port of the Barcode Writer in Pure PostScript library. It validates your input for the selected symbology, adds check digits where the standard requires them and outputs vector SVG that stays sharp at any printing size.
Which barcode type should you use?
| Type | Data | Typical use |
|---|---|---|
| EAN-13 / EAN-8 | 12 or 7 digits + check digit | Retail products worldwide |
| UPC-A / UPC-E | 11 digits + check digit / compressed 8 digits | Retail in the US and Canada |
| Code 128 | Full ASCII | Shipping labels, inventory, asset tags |
| Code 39 / Code 93 | A–Z, 0–9 and a few symbols | Industry, healthcare, government |
| ITF-14 | 13 digits + check digit | Outer cartons (GTIN-14) |
| ISBN | ISBN-13 | Books |
| Data Matrix, PDF417, Aztec | Text or bytes | Small parts, ID cards, tickets |
Example: EAN-13 check digit
Enter 590123412345 and the generator appends the check digit 7, producing 5901234123457. If you type all 13 digits and the last one is wrong, you get an error instead of a barcode that registers would reject.
Options explained
- Scale sets the width of the narrowest bar in pixels (for PNG) and therefore the overall size.
- Bar height applies to linear barcodes only.
- Quiet zone adds blank space around the symbol. Scanners need it, so do not crop it away.
- Human-readable text prints the digits under the bars, as retail standards expect.
- Rotation turns the barcode by 90°, 180° or 270° for vertical labels.
1D versus 2D barcodes
Linear (1D) barcodes store a short number or string in the widths of bars and spaces and are read by inexpensive laser scanners at checkout. 2D symbologies such as Data Matrix, PDF417 and Aztec arrange modules in a grid or stacked rows and hold much more data in a smaller area, even surviving partial damage thanks to Reed–Solomon error correction. They need camera-based (imaging) scanners. Pick 1D codes when you must work with existing retail or warehouse equipment, and 2D codes for small parts, documents and tickets. Data Matrix is also the standard for marking electronic components and pharmaceutical packaging.
Important: a barcode is not a product number
You can draw any EAN or UPC number, but to sell through retailers the number must come from GS1, the organisation that assigns company prefixes. Invented numbers may clash with real products. For internal use — stock rooms, libraries, asset tracking — Code 128 is usually the simplest choice because it accepts letters and digits.
Print quality tips
Use SVG for print and keep dark bars on a light background; red bars are invisible to many laser scanners. Test the printed result with a phone scanner app before ordering large label runs. For QR codes with logos-free styling and Wi-Fi or contact payloads, use the QR code generator; to check a QR code you already have, use the QR code reader.
Privacy
Barcodes are rendered locally in your browser; the values you enter are never uploaded.