Barcode Generator
Generate an EAN, UPC, Code 128, Code 39, ITF or Codabar barcode and download it as PNG or SVG
Any ASCII text. Picks the densest subset for you.
Auto packs digits two to a symbol and drops back to letters where it has to, which is the shortest a Code 128 gets. Pick a subset by hand only when the system reading it insists on one.
Bar width is what decides how large the symbol has to be printed, which the printed size table turns into millimetres. Height only has to be enough that a scanner crossing at an angle still meets every bar, which is roughly 15% of the width.
Symbol contrast 100%, grade A under ISO/IEC 15416. A scanner reads reflected light, so brightness is what matters rather than hue. Red bars are the classic trap, since a red laser sees them almost as paper.
| Printed at | Symbol width | Narrow bar |
|---|---|---|
| 96 dpi | 122.2 mm | 0.53 mm |
| 300 dpi | 39.1 mm | 0.17 mm · too fine |
| 600 dpi | 19.6 mm | 0.08 mm · too fine |
A PNG carries no resolution of its own, so this is the size the symbol lands at when the file is placed unscaled at each resolution: 231 modules wide including the quiet zones, at 2px each. The flagged rows fall under the 0.264mm GS1 sets as the floor for a symbol read at a point of sale. Use the bar width presets to fix that, or export the SVG, which scales to any size without one. The blank margin on both sides is the quiet zone the standard requires, and cropping it off is the most common reason a barcode that looks fine on screen fails once printed.