Barcode Generator

Generate EAN-13, EAN-8, UPC-A, Code 128, Code 39, ITF-14, and Codabar barcodes in your browser. Automatic check digits, SVG and PNG export, no upload.

  • Runs in your browser
  • Tool input is not uploaded to ZeroTool servers
  • Free · No Sign-Up
Copy SVG copies the complete markup; SVG downloads it and PNG renders the current image at four times its dimensions.
Reset restores the EAN-13 sample and default appearance, then clears the saved input.

Barcode input

Select one of seven symbologies; changing it replaces invalid data with that symbology’s sample.
EAN-13, EAN-8, UPC-A and ITF-14 append or verify a check digit; Code 128 accepts ASCII 0–127.
Appearance
Set the narrow bar width from 1 to 4 pixels; the preview updates immediately.
Set the bar height from 40 to 160 pixels in steps of 4.
Show or hide the human-readable text in both the preview and exports.

Preview

Enter valid data to preview a barcode.

Read the full guide Barcodes That Actually Scan: A Developer's Guide
Examples, details and FAQ Worked examples, how it compares with other tools, and answers to common questions.

Choosing a symbology

SymbologyInputTypical use
EAN-1312 digitsRetail products worldwide; also ISBN-13, ISSN, and JAN
EAN-87 digitsSmall packaging with no room for a full EAN-13
UPC-A11 digitsRetail products in North America
Code 128ASCII 0-127Logistics, warehousing, internal asset labels
Code 390-9, A-Z, space, - . $ / + %Industrial, automotive, and defence systems
ITF-1413 digitsShipping cartons and pallet-level trade units
Codabar0-9 and - $ : / . +Libraries, blood banks, courier labels

If a retail product is involved, the numbering scheme decides the symbology for you: a GTIN-13 has to be an EAN-13 and a GTIN-12 has to be a UPC-A. For anything internal, Code 128 is usually the right default because it encodes letters, digits, and punctuation in a compact symbol.

How check digits work

EAN-13, EAN-8, UPC-A, and ITF-14 all share one check digit formula. Working from the rightmost data digit toward the left, digits are weighted 3, 1, 3, 1, and so on. The weighted sum is then subtracted from the next multiple of ten:

check = (10 - (weighted sum mod 10)) mod 10

For the data 590123412345 the weighted sum is 83, so the check digit is 7 and the complete EAN-13 is 5901234123457. Code 128 carries its own modulo-103 check symbol, which is computed and embedded automatically and never shown in the human-readable text. Code 39 has an optional modulo-43 check character that some closed systems require; enable it only when the receiving system asks for it, because a scanner that does not expect it will report the extra character as part of the data.

Printing so it scans

Two settings decide whether a printed barcode survives contact with a real scanner. The first is bar width: the narrowest bar has to stay wide enough for the printer's resolution, so thermal labels usually want at least two pixels per module at the size you export. The second is the quiet zone — the blank margin on each side. This generator includes the quiet zone in the exported image, so do not crop the whitespace and do not place the barcode flush against a box edge or another graphic.

Bar height matters less to decoding than width, but a taller symbol is easier to scan at an angle. Keep the human-readable text switched on for anything a person may need to key in by hand when a label is damaged.

Length is the third constraint, and it only applies to the variable-length symbologies. A handheld scanner reads what fits in its field of view, so a very long payload produces a symbol that is physically valid yet unreadable in one pass. The status line flags this above 48 characters for Code 128 and above 43 for Code 39 and Codabar. The barcode is still generated — the warning tells you it needs a wider-field scanner or a shorter payload.

Scope

The seven symbologies above are what this tool encodes. UPC-E is not among them: it is the zero-suppressed print variant of UPC-A, and a scanner expands it back to the same twelve-digit number, so generate the UPC-A instead. EAN two-digit and five-digit add-ons, which carry magazine issue numbers and book prices, are separate supplemental symbols and are out of scope. Code 128 encodes your input literally — GS1-128 application identifiers written in parentheses are treated as ordinary characters rather than parsed, and no FNC1 separator is inserted. For bulk generation, run your list through a barcode library in a local script.

Privacy

Everything happens client-side. ZeroTool has no upload endpoint for this tool: the symbology tables, check digit maths, SVG rendering, and PNG conversion all execute in your browser. Your last input is kept in local browser storage so the page restores it on your next visit, and Reset clears that entry.

FAQ

Which barcode symbologies can this generate?

EAN-13, EAN-8, UPC-A, Code 128, Code 39, ITF-14, and Codabar. EAN-13 also covers ISBN-13, ISSN, and JAN, because those numbering schemes share the EAN-13 encoding. That list is the complete set this tool encodes.

Do I have to enter the check digit myself?

No. Enter the data digits and the check digit is calculated and appended for EAN-13, EAN-8, UPC-A, and ITF-14. If you paste a full-length code that already ends in a check digit, the existing digit is verified instead and you are told the correct value when it does not match.

Why can't I change the bar and background colors?

Scanners read barcodes through the contrast between dark bars and a light background, and low-contrast color pairs are a common reason a printed barcode fails to scan. The tool fixes black bars on a white background, which rules out color as a cause; print size and print quality still affect whether a printed barcode scans.

Is my product data uploaded anywhere?

No. Encoding, rendering and export run in the page, and the page sends no request with what you type. Each time a barcode is drawn, the tool saves the symbology, the data, the bar width and height and the two check boxes in this browser's localStorage, so they come back on your next visit; Reset or Ctrl/⌘+L in the tool deletes the saved entry. The page loads Google Analytics and AdSense like other tool pages: downloading an SVG or PNG, copying the SVG and pressing Reset each record an event with the tool name and the action only, not your data.

Should I export SVG or PNG?

Use SVG for print and for anything that will be resized, because it stays sharp at any scale. Use PNG when a tool only accepts raster images; the PNG is rendered at four times the on-screen size so narrow bars stay crisp.