# Barcode generator

URL: https://www.toolflux.app/en/barcode-generator/
Stand: 2026-06-06

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.

## 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 case | Format | What it's for |
|---|---|---|
| Retail | EAN-13 | retail products in the EU and worldwide |
| Book | ISBN-13 | ISBN as an EAN-13 with a 978 or 979 prefix |
| Industrial / internal label | Code 128 | printable ASCII characters, densely packed |
| Simple handheld scanner | Code 39 | rugged, readable by almost any scanner |
| Shipping carton | ITF-14 | shipping 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](/en/qr-code-generator/) is the better fit. The check-digit idea here is a cousin of the [hash-generator](/en/hash-generator/), which turns an input into a short fingerprint, and of the [base64-encoder](/en/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.

### FAQ

**What's the difference between EAN-13, UPC-A, and Code 128?**

EAN-13 and UPC-A are numeric retail codes: EAN-13 carries 13 digits and is the European standard, UPC-A carries 12 digits and is the North American one. Code 128 is alphanumeric, packs letters and digits densely, and suits internal labels and logistics rather than retail checkout.

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

Take the first 12 digits, multiply every other position (counting from the right) by 3 and the rest by 1, then add it all up. The check digit is (10 minus the last figure of that sum) modulo 10. For 400638133393 the sum is 89, the last figure is 9, so the check digit is (10 minus 9) mod 10 = 1, giving 4006381333931.

**How small can a printed barcode be and still scan?**

What matters is the module width, the width of the narrowest bar. From around 0.264 mm most scanners read reliably; below that it gets risky, and under 0.2 mm the print check turns red. The quiet zone, the clear margin on each side, matters just as much: drop it and many scanners miss the code.
