Barcode generator: EAN, UPC, ISBN, Code 128 - with inspector and print-readiness check

Which barcode does your product need? The generator recommends EAN-13, ISBN-13, Code 128, or ITF-14, shows the check-digit derivation, and flags whether the code still scans once printed.

A barcode generator turns your data into a scannable bar pattern - here for EAN-13, EAN-8, UPC-A, ISBN-13, Code 128, Code 39, and ITF-14. You pick the use case, the tool recommends the format, works out the check digit, and tells you whether the code still reads once it hits a printer.

Decision helper

Which barcode do you need?

Format

Check digit 1 is correct.

Result
4006381333931

Print check: Size and quiet zone are within the usual range.

Module width 0.330 mm Quiet zone 3.30 mm

The result explained

Each character becomes a symbol, each symbol a fixed bar pattern.

Symbols

Pick a symbol to see its bit pattern.

Legend
Start / stop bars Centre guard Data positions Check digit Quiet zone

Total: 95 modules (excluding the quiet zone).

Check digit (modulo 10)

Every other position counts triple (starting from the right).

Digit400638133393
Weight×1×3×1×3×1×3×1×3×1×3×1×3
Product40018324193999

Sum 89, remainder 9 → check digit (10 − 9) mod 10 = 1

Which barcode type is right for my product?

It comes down to where the code gets scanned. Retail products in the EU and most of the world use EAN-13, books use ISBN-13, internal labels with text and digits usually use Code 128, and shipping cartons carry ITF-14. The decision helper at the top makes the call for you: one click on the use case and the matching format is set.

Use caseFormatWhat it's for
RetailEAN-13retail products in the EU and worldwide
BookISBN-13ISBN as an EAN-13 with a 978 or 979 prefix
Industrial / internal labelCode 128printable ASCII characters, densely packed
Simple handheld scannerCode 39rugged, readable by almost any scanner
Shipping cartonITF-14shipping unit on the outer case

EAN-8 is the short variant for small packs where a full EAN-13 won't fit. UPC-A is the North American counterpart to EAN-13 with 12 digits. You can override the recommendation any time - the format selection stays visible.

One thing to keep in mind: the tool renders the barcode symbol from your data, it doesn't assign an official product number. A GTIN for retail comes from GS1, an ISBN from your national ISBN agency.

How is the check digit of an EAN-13 calculated?

The last digit of an EAN-13 isn't payload, it's a check digit that catches typos. It follows from the first 12 digits through a weighted sum modulo 10. The inspector below walks through that derivation digit by digit instead of hiding it.

Here's the maths for 400638133393:

  1. Every other position counts triple, starting from the right; the rest count once.
  2. Add up all the products. In this example the sum is 89.
  3. The check digit is (10 minus the last figure of the sum) modulo 10. Here: (10 minus 9) mod 10 = 1.

So the full code is 4006381333931. The same modulo-10 logic drives EAN-8, UPC-A, ISBN-13, and ITF-14, just over a different number of data positions. Code 128 uses a weighted sum modulo 103 instead, and Code 39 has an optional modulo-43 check character.

Why your printed code doesn't scan

The most common cause is size. A barcode is built from modules, and the narrowest module can't shrink without limit, or printers and scanners stop resolving it cleanly. The print check rates your current settings and warns you before you send an unreadable code out the door.

Four things decide whether a printed code reads:

  • Module width. For EAN and UPC codes the symbol scans reliably from around 0.264 mm. Go narrower and the print check turns yellow; below 0.2 mm it turns red.
  • Quiet zone. The clear margin on the left and right is part of the code. Switch it off and you'll see a warning, because the code can clip at the edge.
  • Print resolution. A PNG exported at low resolution smears the bars. The SVG stays losslessly scalable and is the safe choice for printing.
  • Contrast. Dark bars on a light background. Coloured or grey codes on a busy background are a frequent reason scans fail, even when the size is fine.

The 0.264 mm and 0.2 mm thresholds come from the EAN and UPC minimum sizes. Other formats have their own requirements: ITF-14 for outer cartons, for instance, is printed considerably larger in practice and needs extra bearer bars that this tool does not add. Treat the print check as a rough early warning, not a standards sign-off.

The print check is a qualitative read, not a substitute for a calibrated verifier. A formal grade to a print-quality standard needs verification equipment - but the tool flags early when a setting is obviously too tight.

EAN, UPC, Code 128, or QR code?

Linear codes like EAN and UPC store a short number that a checkout system looks up in a database. Code 128 packs letters and special characters densely into a linear pattern too, which suits internal labels. A QR code is two-dimensional and holds far more data, up to a whole URL.

  • EAN-13 / EAN-8: numeric retail codes, the standard in European retail.
  • UPC-A: numeric retail code for North America, 12 digits.
  • Code 128: alphanumeric, high density, typical for logistics and internal asset tags.
  • QR code: 2D, high capacity, readable with any phone camera.

If you want to encode a URL, Wi-Fi credentials, or longer text, the qr-code-generator is the better fit. The check-digit idea here is a cousin of the hash-generator, which turns an input into a short fingerprint, and of the base64-encoder, which translates bytes into printable characters.

Frequently Asked Questions

Can I enter an EAN-13 without the check digit?

Yes. Enter 12 digits and the tool works out the 13th as the check digit and appends it. Enter all 13 and it verifies the last digit, flagging it if it doesn't match the calculation - with the correct check digit shown as a hint.

Which export format should I use for print?

Use the SVG. It scales losslessly to any size without the bars going fuzzy, which makes it the safe choice for a print shop. The PNG at 300 dpi is handy when you want to drop the code straight into an office document.

What is the quiet zone on a barcode?

The quiet zone is the clear white margin to the left and right of the bars. Scanners need it to find the start and end of the code. Crop the code too tightly or switch the quiet zone off, and many devices fail to read it.

Does an ISBN barcode always start with 978 or 979?

Yes. An ISBN-13 is technically an EAN-13 with the book-trade prefix 978 or 979. If your input starts differently, you'll see a prompt, because the code otherwise won't be recognised as a book ISBN.