Skip to the tool
UPC Generator

EAN-13 generator

An EAN-13 prints 13 digits and draws only 12 of them as bars. The first digit hides in the pattern of the digits beside it, so this EAN generator shows you where each one went.

Check digit3

Prefix 952: GS1 keeps this range for sample numbers in demonstrations and documents, so it is safe for a mock-up and never belongs on a product.

1.468 in (37.29 mm) wide by 1.036 in (26.32 mm) tall, clear space included

EAN-13 barcode 9521234543213

An EAN on a product for sale should carry a number licensed to your company by a GS1 office. That is because retailers can look up who holds it. Numbers made here suit mock-ups, tests and labels that stay inside your company. The route to a licensed number is in how to get a UPC code.

  • Narrow bar: 0.33 mm (13 mil)
  • Clear space: 0.143 in (3.63 mm) left, 0.091 in (2.31 mm) right at minimum
  • PNG at 300 dpi: 452 by 312 dots, narrow bar 4 dots, so it prints at 0.339 mm
More options
Show sizes in

Where the 13th digit hides

EAN-13 draws only 12 digits as bars. The first digit is carried by which of two digit sets each left-hand digit uses, so pick a digit and watch its set.

Digit 5, set L, chosen by the leading 9. Pattern 0110001. Runs from module 3 to 10.

The check digit sum for your number

9 x 1 + 5 x 3 + 2 x 1 + 1 x 3 + 2 x 1 + 3 x 3 + 4 x 1 + 5 x 3 + 4 x 1 + 3 x 3 + 2 x 1 + 1 x 3 = 77. The next ten up is 80, and 80 minus 77 leaves 3.

By the UPC Generator team. Follows the GS1 General Specifications, Release 26.0, matches a second encoder bar for bar, and sample files are read back by decoding software. Last updated 4 November 2026. How UPC Generator pages are made.

How the first digit hides in the bars

The right-hand six digits always use one digit set, called R. The left-hand six each use one of two sets, L or G, and the order of those choices spells out the first digit. A scanner works out the order, and from it the digit that was never drawn.

How the first digit sets the left-hand digit patterns
First digit Left-hand digit sets
0 L L L L L L
1 L L G L G G
2 L L G G L G
3 L L G G G L
4 L G L L G G
5 L G G L L G
6 L G G G L L
7 L G L G L G
8 L G L G G L
9 L G G L G L

Take the published number 4006381333931. The leading 4 gives the pattern L G L L G G. So the 0 after it is drawn in set L, the next 0 in set G, and so on. The first row of the table is why a UPC reads as an EAN. A leading zero means all six left-hand digits use set L, which is exactly how a UPC-A draws them.

Making an EAN barcode

Type 12 digits and the check digit appears, or type all 13 and a wrong last digit gets flagged with the correct one. Download SVG or PDF for packaging artwork, and PNG at your printer's resolution for labels. The preview hatches the clear space, which is wider on the left because the first digit prints there.

What a GS1 prefix tells you

The first three digits name the GS1 office that issued the number, or a special range. A few you will meet often:

GS1 prefix ranges and the office or use behind each
Prefix Meaning
001 to 019, 030 to 039, 060 to 139 GS1 US
040 to 049 Use inside one company
050 to 059 Held back by GS1 US
200 to 299 Local schemes, such as store-packed food sold by weight
400 to 440 GS1 Germany
500 to 509 GS1 UK
690 to 699 GS1 China
952 Demonstrations and examples
977 Magazines and journals, with an ISSN
978 to 979 Books, with an ISBN
980 to 983, 990 to 999 Refund receipts and coupons

The prefix reader covers the whole GS1 list as you type. Remember what it can and cannot tell you: a number starting 400 was licensed through GS1 Germany, and the goods could have been made anywhere.

EAN-13 sizes

Sizes match the UPC table, because the symbol is the same width: 113 modules with its clear space. At 100 percent that is 37.29 mm wide, with bars 22.85 mm tall. GS1 allows 80 percent, a 0.264 mm narrow bar, up to 200 percent, a 0.66 mm narrow bar. The bars should stay at the height shown, and shortening them is a last resort for packs with no room.

Worked example from GS1

GS1 uses 629104150021 to show the sum. Multiplying by 1 and 3 in turn gives 6 + 6 + 9 + 3 + 0 + 12 + 1 + 15 + 0 + 0 + 2 + 3 = 57. The next ten is 60, so the check digit is 3 and the full number is 6291041500213. You can run any number through the same steps with the check digit calculator.

When EAN-13 is not the right barcode

In the US and Canada, most packaged goods carry a UPC-A barcode. Very small packs may fit EAN-8, which is one of the formats in the barcode generator. Shipping cartons usually need the sturdier ITF-14, and that symbol can carry your EAN's number with a pack-size digit added.

Books, and the number inside

An ISBN is already an EAN-13 number, beginning 978 or 979. The ISBN barcode guide explains the small price add-on printed beside it on a book cover. Whatever its length, the number inside an EAN or UPC is a GTIN. How an EAN's digits relate to a UPC's and to the longer code on a carton is in the GTIN guide.

EAN barcode questions

What is the difference between EAN-13 and UPC-A?

A UPC-A is an EAN-13 with a leading zero that is not printed. The bars are identical, so 036000291452 and 0036000291452 draw the same symbol, and scanners outside North America have read both for years.

Does the prefix show which country a product comes from?

No. GS1 says plainly that a prefix does not show country of origin. It shows which GS1 office issued the company's license, and a company can make its goods anywhere.

How do I turn my UPC into an EAN-13?

Put a zero in front of the full 12 digits, and keep the same check digit. The Have a 12 digit UPC box does this and checks your UPC first. You do not need a new number or a new license.

Why does my EAN barcode start with 978 or 979?

Those prefixes are for books, and the number is an ISBN-13. The check digit works the same way, so the barcode is a normal EAN-13. The ISBN itself comes from the national ISBN agency where you publish, and an ISBN barcode does not need a GS1 membership.

What number can I use for a sample or a mock-up?

GS1 keeps the 952 prefix for demonstrations and examples, so a sample from that range will never belong to a real product. The sample button fills one in with the right check digit.

How do I add the price to a book barcode?

Type the 5 digit price code in the add-on field. The tool draws it after the main symbol with its digits above the bars, the way the book trade prints it. The ISBN barcode guide explains which 5 digits a price becomes.

What is the > mark next to some EAN barcodes?

It is an optional printing aid. Its tip marks the edge of the 7 module clear space on the right, so nobody places artwork too close. Scanners ignore it.

5 source documents

  1. GS1: General Specifications, Release 26.0, sections 5.2 and 5.12.3.1, fetched 2 November 2026
  2. GS1: GS1 Company Prefix list, fetched 2 November 2026
  3. GS1: How to calculate a check digit manually, fetched 2 November 2026
  4. International ISBN Agency: ISBN bar coding, fetched 2 November 2026
  5. Wikipedia: International Article Number, digit set tables, fetched 2 November 2026