EAN-13 barcode generatorPart of Barcode Generator →

EAN-13 barcode generator for retail product codes

The CardDeck EAN-13 barcode generator turns your GS1 product number into a retail barcode, with the check digit calculated for you. Enter 12 digits, check the preview and download a print-ready SVG or PNG for packaging and labels.

4006381333931 · EAN-13
QUICK ANSWER

What is an EAN-13 barcode?

An EAN-13 barcode is the 13-digit retail barcode used at checkouts worldwide, managed by GS1. It encodes a GTIN-13: a GS1 prefix, your company prefix, an item reference and a final check digit. CardDeck generates the barcode from the 12 digits you enter and calculates the check digit automatically. Retail use requires GS1-issued numbers.

Updated October 2026 · 6 min read · By the CardDeck team
Key takeaways
  • EAN-13 holds exactly 13 digits; the last is a modulo-10 check digit
  • For retail, the number must come from GS1 (a GTIN-13)
  • Enter 12 digits and CardDeck calculates the 13th
  • Nominal size is about 37.3 × 25.9 mm at an X-dimension of 0.33 mm
  • Leave 11X of quiet zone on the left and 7X on the right

What is an EAN-13 barcode?

An EAN-13 barcode is a 13-digit retail barcode defined by GS1, the not-for-profit organization that manages product identification standards. It is scanned at checkouts and in warehouses worldwide, and the number it holds is a GTIN-13 (Global Trade Item Number).

EAN originally stood for European Article Number. Today the format is used internationally, and scanners in the US and Canada read EAN-13 as well as the 12-digit UPC-A.

What the 13 digits mean

  • GS1 prefix (first 2–3 digits): identifies the GS1 member organization that issued the number. It does not indicate where a product was made.
  • Company prefix: the rest of your GS1 Company Prefix, unique to your business. Its length varies.
  • Item reference: the digits you assign to each product, size and variant.
  • Check digit: the final digit, calculated from the other 12.

Special prefixes

  • 978 and 979 are used for books, where the EAN-13 holds the ISBN.
  • Prefixes 20–29 are reserved for restricted, in-store use, such as variable-weight items labeled by a shop. They are not unique worldwide.

What the bars look like

The barcode is 95 modules wide: a start guard, six left-hand digits, a center guard, six right-hand digits and an end guard. The first digit is not drawn as bars; it is encoded by the pattern of the six left-hand digits.

Do you need GS1 to get an EAN-13 barcode?

Yes, for retail. Any EAN-13 that goes on a product sold through retailers or major marketplaces should come from GS1. CardDeck draws the barcode from your number; it does not issue numbers.

How to get numbers

  1. Contact your local GS1 member organization.
  2. License a GS1 Company Prefix, sized to how many products you need to number, or buy individual GTINs where your GS1 organization offers them.
  3. Assign an item reference to each product and variant. Each size, color and pack size needs its own GTIN.
  4. Record product details in GS1's registry so retailers can match your numbers to your brand.

Avoid resold numbers

Some websites sell cheap EAN or UPC numbers that were originally licensed to another company. Retailers and marketplaces can check numbers against GS1's records, and a mismatch can get listings rejected. If your products are going into retail, buy directly from GS1.

When you do not need GS1

For items that never pass through a retail checkout, such as internal stock, assets, staff IDs or event tickets, use Code 128 instead, with any values you like.

How is the EAN-13 check digit calculated?

The EAN-13 check digit uses GS1's modulo-10 method: weight the first 12 digits alternately by 1 and 3 from the left, add the results and find the number that brings the total up to the next multiple of 10.

Worked example: 400638133393

  1. Write out the digits: 4 0 0 6 3 8 1 3 3 3 9 3.
  2. Multiply by 1, 3, 1, 3 and so on: 4, 0, 0, 18, 3, 24, 1, 9, 3, 9, 9, 9.
  3. Add them: 89.
  4. The next multiple of 10 is 90. 90 − 89 = 1.
  5. The check digit is 1, so the full number is 4006381333931.

If the total is already a multiple of 10, the check digit is 0.

Why it matters

The check digit lets a scanner catch most single-digit misreads and swapped neighboring digits. If the recalculated digit does not match, the scanner rejects the read.

What CardDeck does

  • Enter 12 digits and CardDeck adds the check digit.
  • Enter 13 digits and CardDeck verifies the last one, flagging a mismatch. A wrong check digit usually means a typo elsewhere in the number.

What size should an EAN-13 barcode be?

At 100% magnification, an EAN-13 barcode is about 37.29 mm wide and 25.93 mm tall including its quiet zones, with an X-dimension of 0.33 mm. GS1 allows magnifications from 80% to 200% for general retail use.

Magnification range

  • 80%: about 29.8 × 20.7 mm. The smallest size for general retail.
  • 100%: about 37.3 × 25.9 mm. The nominal size.
  • 200%: about 74.6 × 51.9 mm. For large items or difficult surfaces.

Your printer or packaging supplier may recommend a minimum magnification for the printing process, because some processes spread ink and thicken bars.

Quiet zones

Leave at least 11 times the X-dimension clear on the left and 7 times on the right. At 100%, that is about 3.6 mm and 2.3 mm. Many printed barcodes fail because a box edge, a border or text runs into this space.

Height

Do not cut the bar height to fit a small pack. GS1 discourages truncation, because shorter bars are harder to scan at a checkout, where products are passed over the scanner at many angles.

Color and placement

  • Black bars on a white background are safest. Dark blue or dark green on white can work.
  • Never use red bars; checkout scanners use red light and cannot see them.
  • Avoid seams, folds and tight curves, and put the barcode on the back or bottom of the pack where retailers expect it.

How do I create an EAN-13 barcode with CardDeck?

Choose EAN-13, enter your 12-digit GTIN, check the preview and download an SVG for your packaging artwork. For a whole range, generate them from a spreadsheet.

Single barcode

  1. Open the barcode generator and choose EAN-13.
  2. Enter the first 12 digits of your GTIN-13.
  3. Check the preview and the number printed under the bars.
  4. Download SVG and place it in your packaging artwork at 80–200% of nominal size.
  5. Print a proof on the real material and test-scan it.

A whole product range

  1. List your GTINs in a spreadsheet, one per row, with the column formatted as Text so leading zeros are kept.
  2. Upload it to the bulk barcode generator and choose EAN-13.
  3. Fix any flagged rows, such as wrong lengths or check digits.
  4. Download a ZIP of SVG files named after each number.

Selling in North America?

US and Canadian retailers' scanners read EAN-13. If a buyer specifically asks for UPC-A, see the UPC-A barcode generator. A UPC-A number is the same as an EAN-13 that starts with 0.

EAN-13 vs UPC-A

AspectWithout CardDeckWith CardDeck
DigitsUPC-A: 12EAN-13: 13
Main regionUPC-A: US and CanadaEAN-13: international
Issued byUPC-A: GS1 USEAN-13: any GS1 member organization
Check digitUPC-A: modulo 10, weights start at 3EAN-13: modulo 10, weights start at 1
RelationshipUPC-A: a 12-digit GTINEAN-13: a UPC-A with a leading 0 is the same number
Try EAN-13 Barcode free — no credit card required.Start free

How it works

  1. Get your GS1 number

    Use a GTIN-13 assigned from your GS1 Company Prefix, or an individual number from GS1.

  2. Enter 12 digits

    Type the first 12 digits. If you enter all 13, CardDeck verifies the check digit.

  3. Check the preview

    Confirm the number printed under the bars matches your product record.

  4. Download and test

    Download SVG for packaging artwork, print a proof at size and scan it.

What’s included

Automatic check digit

Enter 12 digits and the 13th is calculated with the GS1 modulo-10 method.

Check digit verification

Enter all 13 digits and a wrong check digit is flagged.

Digits-only validation

Letters, spaces and dashes are caught before export.

Vector export

SVG for packaging artwork, so bars stay sharp at any magnification.

Bulk generation

A whole product range from one spreadsheet of GTINs.

Free and unlimited

Static barcodes are unlimited on every plan.

POPULAR WITHRetail & InventorySmall Business

Use cases

Consumer products

Packaging barcodes for products sold through retailers.

Online marketplaces

Barcodes for listings that require a GTIN.

Publishers

ISBN barcodes for books in the 978 and 979 ranges.

Food and drink producers

Labels for jars, bottles and packs.

Wholesale and distribution

Barcodes for individual retail units in a product range.

Frequently asked questions about EAN-13 barcode

Can I make up my own EAN-13 number?

Not for retail. Retailers and marketplaces expect GS1-issued numbers. For internal use, use Code 128 instead.

Does the EAN-13 prefix show the country of origin?

No. The first digits show which GS1 member organization issued the number, not where the product was made.

Do I need to enter the check digit?

No. Enter 12 digits and CardDeck calculates it. If you enter 13, CardDeck verifies the check digit.

What is the smallest EAN-13 size I can print?

GS1 allows 80% magnification for general retail, about 29.8 × 20.7 mm. Your printer may recommend a larger minimum.

Can US stores scan EAN-13 barcodes?

Yes. Point-of-sale scanners in the US and Canada read EAN-13, though some buyers still specify UPC-A.

Is EAN-13 the same as a GTIN?

EAN-13 is the barcode; the GTIN-13 is the number it carries. One GTIN identifies one product variant.

Is the EAN-13 generator free?

Yes. Static barcodes, including EAN-13, are free and unlimited on every plan.

Works well with

All products →
Codes

Barcode Generator

A free barcode generator for barcodes your scanners already read

Codes

UPC-A Barcode

UPC barcode generator for products sold in the US and Canada

Codes

Bulk Barcode Generator

Bulk barcode generator: create hundreds of barcodes from Excel or CSV

Try EAN-13 Barcode free with CardDeck.

Create your Card