EAN-13 and UPC-A barcode generator
Type the number; the check digit is calculated if missing and verified if present. The tool encodes the left digits with L or G patterns according to the parity of the first digit, draws the barcode with quiet zones and guard bars, and gives it to you as SVG.
The barcode is drawn in your browser; the number you type is not sent anywhere.
Check digit calculated and added: 7
Preview
- Number
- 5901234123457
- Check digit
- 7
- GTIN-14 form
- 05901234123457
- Size
- 37.29 × 22.94 mm
- Module width (X)
- 0.33 mm
- Width
- 113 modules (including quiet zones)
check: weighted sum 3-1 from the right, rounded up to the next ten · 95 modules = 101 + 6 digits (L/G) + 01010 + 6 digits (R) + 101 · the first digit selects the L/G sequence
The tool does not allocate numbers; numbers must come from your company's GS1 prefix. The drawing dimensions, quiet zones and digit typeface are taken from memory; for a printed label, verify them against the GS1 specification and with a barcode verifier (ISO/IEC 15416 grade) before publishing. This calculation is not legal or technical advice.
Let's measure barcode printing, quality grading and read rates on your line together.
Request a conversation01
How to use it
A
Choose EAN-13 or UPC-A and type the number; the check digit is calculated if it is missing.
B
Set the magnification; check the preview, the warnings and the dimensions.
C
Download or copy the SVG and place it in your label design.
02
How is an EAN-13 encoded?
An EAN-13 is 95 modules in total: a 3-module start guard, six digits, a 5-module centre guard, six digits and a 3-module end guard. Each digit is written with 7 modules, made of two bars and two spaces.
The six digits on the right use the R pattern. The six on the left use the L or G pattern, and the first digit of the number decides which is used in which order. The first digit is not drawn as bars at all; it is stored only in this L/G sequence: for 5, for example, LGGLLG.
The check digit is found by multiplying the first twelve digits from the right by 3 and 1, adding them, and rounding the result up to the next ten.
03
How it relates to UPC-A
UPC-A is a 12-digit number and its bars are the same as an EAN-13 with a 0 added in front: all six left digits use the L pattern. This is why an EAN-13 starting with 0 has the same bar pattern. In a UPC-A the first (system) and last (check) digits are written outside the symbol and their bars are slightly extended.
North American retail works with UPC-A; systems that read EAN-13 also read UPC-A. For export, use whichever format the buyer asks for.
04
Quiet zone, size and printing
There must be a bar-free quiet zone on both sides of the barcode; this tool leaves 11 modules on the left and 7 on the right for EAN-13, and 9 modules on both sides for UPC-A. The white background in the preview includes this zone; do not place the SVG on a dark background.
The nominal module width is 0.33 mm (100% magnification); the symbol can be scaled from 80% to 200%. Very small printing, low contrast and blurred edges lower the read rate. Print the label on the printer you will actually use and test it with your reader.
FAQ
- Do I have to enter the check digit myself?
- No. If you type 12 digits for EAN-13 or 11 for UPC-A, the check digit is calculated and added. If you type the full number, the tool verifies the check digit and shows what it should be if it is wrong.
- What is the difference between EAN-13 and UPC-A?
- EAN-13 has 13 digits and UPC-A has 12. A UPC-A has the same bars as an EAN-13 with a 0 added in front; only the placement of the digits differs. Most modern readers read both.
- Does the drawn barcode really scan?
- The encoding rules and the check digit follow the standard, and the output was tested by reading it back with a reader library. Whether a printed label scans still depends on the printer, the material and the size; try the printed label with your own reader.
- Can I type any number I like and use it?
- No. For commercial use the number must come from your company's GS1 prefix. A number that belongs to someone else, or an invented one, causes collisions and rejected shipments. The tool does not allocate numbers; it only draws.
- Why do the digits appear in a different typeface?
- The SVG writes the digits in OCR-B or, if it is not found, in the system's monospaced font. If you want to change the typeface in your design software you can convert the digits to text and rewrite them; do not touch the bars.
Let's verify label printing and read quality on the line
We measure barcode and 2D code printing, quality grading and camera read rates on site, and set them up together with master data and number flow.