Premium apps Part of Printshop
Barcode Generator (EAN-13, UPC-A, Code 128)
EAN-13, UPC-A and Code 128 barcodes with check digits, true-size PDF, SVG and PNG.
Try an example: EAN-13 with the check digit added · UPC-A · Code 128 for a parcel reference
How it works
Make an EAN-13, UPC-A or Code 128 barcode. EAN/UPC check digits are calculated (or verified), Code 128 switches between code sets A, B and C for the shortest symbol, and the result prints at GS1 sizes with quiet zones and a test square.
- EAN-13: the first digit selects the L/G parity pattern of the left half (GS1 table), the right half uses R codes; the check digit is the mod-10 sum with weights 3 and 1 from the right. UPC-A is encoded as EAN-13 with a leading 0.
- Code 128: a dynamic programme over (position, active code set) picks start code, CODE A/B/C switches and SHIFT for the fewest symbol characters; check value = (start + Σ value × position) mod 103.
- Sizes: EAN/UPC module 0.330 mm × magnification (80–200 %), bar height 22.85 mm × magnification, guard bars 5 modules longer; quiet zones 11/7 modules (EAN-13), 9/9 (UPC-A), 10/10 (Code 128).
Retail EAN/UPC numbers must be licensed from GS1; making a barcode does not register a product number. Check print quality with a scanner before mass printing.
Sources
- GS1 General Specifications (EAN/UPC symbol specification, check digit, X-dimension and quiet zones) (GS1)
- ISO/IEC 15417:2007 Information technology — Code 128 bar code symbology specification (ISO/IEC)
- ISO 32000-1:2008 Document management — Portable document format (PDF 1.7) (Adobe / ISO)
- Noto Sans fonts (SIL Open Font License 1.1) (Google / Noto project)
Part of Printshop
-
Printshop Printables studio
QR codes, calendars, labels, graph paper and posters — print-perfect PDFs in seconds.
Related tools
- QR Code Generator (print-ready) – QR codes for links, text, Wi-Fi, contacts and more — as vector PDF, SVG and PNG.
- Label Sheet Maker with CSV Mail Merge – Address labels, name badges and product labels from a CSV, for any sheet layout.
How to use the Barcode Generator (EAN-13, UPC-A, Code 128)
Print EAN-13, UPC-A and Code 128 barcodes at true size with check digits, GS1 module widths and quiet zones, as PDF, SVG and PNG.
What it is for
Shelf labels, inventory tags, order slips and products you sell need barcodes that scanners read the first time. This tool encodes EAN-13 and UPC-A (the retail codes) and Code 128 (letters, digits and symbols) and prints them at true size, including the white quiet zones that scanners need.
It calculates the GS1 check digit when you leave it out and verifies it when you type it. It does not register product numbers — retail numbers must come from GS1 — and it has no EAN-8, add-on codes, GS1-128 application identifiers or 2D codes other than QR.
Worked example
The default input 400638133393 as EAN-13 returns 4006381333931: the tool added check digit 1. The barcode has 95 modules at the GS1 nominal width of 0.33 mm, so with quiet zones it is 37.29 mm wide.
For UPC-A we entered the 11 digits 03600029145; the result is 036000291452 with check digit 2, again 95 modules and 37.29 mm.
The Code 128 example PO-2027-000123 with 15 mm bars on a sheet of copies gives 15 symbol characters and 167 modules, 56.1 mm wide. The code-set line reads BBBBBBBBCCCCCC: the letters and the first digits use code set B, then the tool switches to code set C, which packs the six trailing digits 000123 into three symbols. For a shelf code SHELF-A-03-17 the digit runs are too short to be worth a switch, so all 13 characters stay in set B (16 symbols, 59.4 mm).
How to read the result
- Encoded text: exactly what a scanner will read, including the check digit for EAN/UPC.
- Check digit: the GS1 mod-10 digit; empty for Code 128, whose mod-103 check character is hidden in the bars.
- Modules and Module width: the barcode's length in narrow bars and the width of one bar on paper.
- Width with quiet zones: the space the barcode needs on your label. Leave it free of other print.
- For Code 128, the symbol values and code sets show how the text was packed.
- Files: the page as PDF, SVG and PNG, plus the barcode alone.
Tips and common mistakes
- If you type all 13 digits and one is wrong, the tool reports a check-digit error instead of printing a barcode that will not scan.
- Keep magnification at 1.0 or above for checkout scanners; 0.8 is the GS1 minimum.
- Shorter bars still scan with hand scanners, but keep them as tall as the label allows.
- Code 128 accepts plain ASCII only — no accents or emoji.
- Long digit runs make Code 128 shorter:
000123costs three symbols, not six. - Print at 100 % and check the test square before printing a full sheet.
FAQ
Can I make a barcode for a product I want to sell in shops?
You can print it, but shops expect a GS1-licensed number. A self-invented EAN may clash with an existing product.
What is the difference between UPC-A and EAN-13?
UPC-A is EAN-13 with a leading zero. Scanners worldwide read both.
Why is my Code 128 shorter than I expected?
Even runs of digits are packed two per symbol in code set C, and the tool picks the switch points that give the fewest symbols.
Which size should I print?
For retail, magnification 1.0 (0.33 mm modules). For internal labels Code 128 at 0.30 mm modules works with most scanners.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://printshopbarcode.usefulweb.app/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://printshopbarcode.usefulweb.app/mcp· tool nameprintshop_barcode
Example request
curl -s -X POST https://printshopbarcode.usefulweb.app/api/v1/calculate \
-H 'content-type: application/json' \
-d '{"symbology":"ean13","data":"400638133393"}'