What Is an EAN-13 Barcode? Complete Guide
How an EAN-13 barcode works: the GS1 prefix, company and item numbers, a worked check digit example, print sizes and quiet zones, and how to get real numbers.
By StylQR Editorial TeamPublished 5 min read

Table of contents
An EAN-13 barcode is the 13-digit retail barcode found on consumer products in most of the world. It carries a GTIN-13: a GS1 prefix and company number licensed to the brand, an item number the brand assigns, and a check digit. Checkout scanners read it and look up the product's name and price.
This guide breaks down the digits, works through the check digit by hand, explains how the bars encode the number, and covers the sizing rules printers ask about.
The parts of an EAN-13 number
Using the illustrative number 8906123456781:
| Part | Digits | Example | Meaning |
|---|---|---|---|
| GS1 prefix | First 2 or 3 | 890 | The GS1 member organization that issued the company prefix (890 is GS1 India) |
| Company number | Varies | 61234 | Together with the prefix, this is the GS1 company prefix licensed to one brand |
| Item reference | Varies | 5678 | Assigned by the brand, one per product variant |
| Check digit | Last 1 | 1 | Calculated from the first 12 |
The company prefix and item reference always total 12 digits. A brand with a short prefix has more digits left for products.
What the prefix does and doesn't tell you
The prefix shows where the company joined GS1, not where the product was made. A firm licensed by GS1 India gets numbers starting 890 even if it manufactures abroad. Some prefixes have special meanings: 978 and 979 are for books (ISBN), 977 for serials (ISSN), and 020 to 029 and 200 to 299 are reserved for numbers a retailer uses internally, such as in-store labels for weighed goods.
Working out the check digit
The last digit is a GS1 mod-10 check. For the first 12 digits 890612345678:
| Position | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Digit | 8 | 9 | 0 | 6 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| Weight | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 |
| Result | 8 | 27 | 0 | 18 | 1 | 6 | 3 | 12 | 5 | 18 | 7 | 24 |
- Add the results: 8 + 27 + 0 + 18 + 1 + 6 + 3 + 12 + 5 + 18 + 7 + 24 = 129.
- Round up to the next multiple of 10: 130.
- Subtract: 130 − 129 = 1.
The check digit is 1, so the full number is 8906123456781. If the sum already ends in 0, the check digit is 0.
The weights look different from the UPC-A method (where odd positions get 3), but they're the same rule counted from the right: the digit next to the check digit is always weighted 3. That's why adding a leading 0 to a UPC gives a valid EAN-13 with the same check digit.
How the bars encode 13 digits in 12 slots
An EAN-13 symbol is 95 modules wide, exactly like a UPC-A: start guard, six digits, center guard, six digits, end guard. Each digit is 7 modules made of two bars and two spaces.
So where does the 13th digit go? It isn't drawn. The left six digits can each be drawn in one of two patterns, called L and G, and the mix of L and G across those six spells out the first digit. A first digit of 0 means all six use L, which is why every UPC-A is also an EAN-13 starting with 0. A first digit of 8, as in our example, uses the pattern L G L G G L. The right six digits always use a third pattern, R.
The digits printed under the bars are only for people. The first one sits outside the bars on the left for that reason.
Size, quiet zone and color
GS1 sizes EAN-13 by its X-dimension (the width of one module). The figures below are from GS1 Sweden's size guide for consumer items:
| Minimum | Recommended | Maximum | |
|---|---|---|---|
| X-dimension | 0.264 mm | 0.330 mm | 0.660 mm |
| Bar height | 18.28 mm | 22.85 mm | 45.70 mm |
| Quiet zone | 11 modules left, 7 modules right |
The 0.330 mm X-dimension is called 100% magnification. The allowed range runs from 80% to 200%. At 100%, the full symbol with its quiet zones is about 37.3 mm wide. If you need it smaller, shrink width and height together. Cutting just the height (truncation) makes scanning harder and is only allowed when the pack really has no room.
Color rules are simple: dark bars, light background, high contrast. Scanners use red light, so red bars look the same as a white background and won't scan. Avoid placing the code over seams, folds or tight curves.
If the code is going on outer cartons instead of the retail pack, GS1 calls for larger sizes, and many companies use ITF-14 or GS1-128 there instead. What a GS1 barcode is covers those.
EAN-8 for tiny packs
When a product is too small for even a reduced EAN-13, GS1 can issue an eight-digit GTIN-8 for an EAN-8 barcode. These are allocated individually, and GS1 organizations may ask you to show that an EAN-13 won't fit. You can draw one on the EAN-8 generator page.
How to get EAN-13 numbers
You license them from your national GS1 organization. In India that's GS1 India, which states that it is the only authorized provider of barcodes starting with 890 and warns that buyers of unauthorised barcodes can face trade restrictions at retailers and marketplaces (GS1 India). Other countries work the same way through GS1 UK, GS1 Germany and so on. Fees vary by country and by how many numbers you need, so check your national site.
StylQR doesn't issue EAN numbers. Once you have yours, the generator draws them at the size and resolution you choose.
Next steps
The full process from licensing numbers to printed labels is in how to create a barcode for your products. If you sell in North America too, UPC vs EAN explains how the two formats work together. For a whole catalog, the bulk barcode generator turns a spreadsheet of EANs into print-ready files, and how to generate multiple barcodes at once walks through it.
Frequently asked questions
Is EAN-13 the same as GTIN-13?
Nearly. GTIN-13 is the 13-digit number, and EAN-13 is the barcode symbol that carries it. People use the two names interchangeably.
What are the small extra barcodes next to some EAN-13 codes?
Those are EAN-2 or EAN-5 add-ons. Magazines use a two-digit add-on for the issue number, and some books use a five-digit add-on for a suggested price.
Can I print an EAN-13 barcode in color?
Yes, as long as the bars are dark and the background light. Black, dark blue or dark green bars on white or pale yellow work; red, orange or yellow bars do not, because scanners use red light.
Do I need a separate EAN-13 for each pack size?
Yes. A 250 g and a 500 g pack of the same product are different trade items and each needs its own GTIN.


