Barcode Tools
Barcode Generator
Generate linear barcodes with the right check digit and quiet zone, and download them as SVG or PNG.
Understand the format
How Barcode Generator works
A linear barcode is a width-encoded number: the scanner measures ratios between bars and spaces, which is why quiet zones and print quality matter more than size.
How a scanner actually reads a symbol
A laser or camera scanner sees a one-dimensional signal of light and dark and measures the relative widths of the bars and spaces. It never measures absolute millimetres, so a symbol can be printed large or small as long as the ratios survive. What it cannot recover from is a missing quiet zone: the blank margin either side tells the decoder where the symbol begins and ends, and cropping it is the single most common cause of a label that will not scan.
Each symbology also carries start and stop patterns so the scanner can detect orientation and read the symbol in either direction. That is why the pattern this page generates is longer than the data alone would suggest.
Check digits are part of the data, not decoration
Retail symbologies build in a check digit computed from the other digits, using a weighted modulo-10 sum defined by the GS1 general specifications. A scanner recomputes it and rejects the read if it disagrees, which is what makes misreads rare. This page calculates that digit for you, and if you supply one that does not match it reports the mismatch rather than silently encoding a barcode that no retailer will accept.
Code 128 works differently: it carries a modulo-103 check symbol that the scanner verifies and then strips, so it never appears in the decoded data. Code 39 has an optional modulo-43 check character which, if you add it, is returned as part of the data for the receiving system to remove.
Choosing between the symbologies
Use Code 128 for anything internal: it encodes the full printable ASCII set and packs digits two per codeword, making it the most compact of the linear formats. Use EAN-13 or UPC-A only with a GS1 company prefix you have been allocated, because those numbers identify a product globally and are not yours to invent. ITF-14 identifies a carton of retail units rather than a single item.
Code 39 remains common in older industrial and defence systems because almost every scanner reads it without configuration, but it is the least dense format here: every character costs nine elements. Codabar survives in libraries, blood banks, and photo labs, and has no check digit of its own.
Step by step
How to use Barcode Generator
- Choose the symbology your scanner or trading partner expects.
- Type the data. For the retail formats you can leave the check digit off and let it be calculated.
- Adjust the module width and bar height for the size you intend to print.
- Download SVG for print and labels, or PNG for a screen or a document.
- Test the printed label with the actual scanner before committing to a production run.
Barcodes are generated and rendered entirely in your browser. No data is uploaded, and downloads are produced locally from the same pattern shown on screen.
Troubleshooting
Common mistakes and how to fix them
- The label scans on screen but not once printed.
- Usually resolution or ink spread. Print from the SVG rather than a scaled-up PNG, and keep the narrow bar at least 0.25mm for retail symbols.
- Cropping the white margin to fit the artwork.
- Quiet zones are specified in modules, typically ten either side and eleven for EAN-13. Without them a decoder cannot find the symbol edges.
- Making up an EAN-13 number for a product.
- Retail numbers are allocated from a GS1 company prefix. An invented number may already identify someone else’s product.
- Stretching the symbol horizontally to fill a space.
- Scanners read width ratios. Change the module width or the height, never the aspect ratio of individual bars.