Skip to content
Number Buffet

EAN-13 barcodes

Thirteen-digit retail barcode numbers with correct check digits, drawn from the GS1 prefixes that are never registered products.

3 min read

Settings

Quick presets

The first three digits say which GS1 member organisation or special-purpose range the number came from. They are not a country of origin.

The printed grouping is not cosmetic: the leading digit sits outside the bars because it is encoded in the pattern of the six that follow it.

Change the seed for a different list. The same seed always gives the same codes, so a shared link shows everyone the same fixtures.

Fine-tune the look

Pick a preset next to the image first — these controls adjust it.

Frame

A border drawn inside the edge of the image.

Advanced

Results

10 values

9 522286 469681, 9 521370 314418, 9 522495 595331, 9 527189 101300, 9 520198 607412, 9 525950 629305, 9 526056 188994, 9 523342 904115, 9 521195 511108, 9 520336 637271

Check digits are computed, so every code here scans and validates. That does not make it a product: a format-valid EAN-13 is only a well-formed number, and the digits after the prefix belong to whichever company GS1 has assigned that block to. The ranges offered below are the ones that are never globally registered products, which is what makes them safe for fixtures. GS1 lists prefix 952 for demonstrations and examples of the GS1 system, which makes it the safest choice for documentation, screenshots and test fixtures. The list is de-duplicated, so every code is distinct — fixtures usually need unique keys.


Make an image

Turn on JavaScript to style and download these numbers as an image. The values themselves are listed above.

Text on the image

Drag a line straight onto the picture to place it — once placed, it stays exactly where you put it. Everything here is drawn into the download.

About ean-13 barcodes

EAN-13 is Europe's extension of an American invention. The barcode itself was patented by Norman Joseph Woodland and Bernard Silver, who filed on 20 October 1949 and were granted US Patent 2,612,994 on 7 October 1952. Woodland traced the idea to Morse code: working at his father's apartment in Florida, he drew dots and dashes in the sand and, as he later put it, "extended the dots and dashes downwards", turning them into narrow and wide lines. Their symbol was a bullseye of concentric rings — readable in principle, awkward to print well in practice.

Two decades later the American grocery industry wanted one machine-readable number per product. IBM's entry, designed by George Laurer, replaced the rings with vertical bars, and on 3 April 1973 it was adopted as the industry standard. The Uniform Code Council was founded in 1974 to assign the numbers, and at 8:01 on the morning of 26 June 1974, at the Marsh Supermarket in Troy, Ohio, cashier Sharon Buchanan scanned a 10-pack of Wrigley's Juicy Fruit gum for Clyde Dawson, Marsh's director of research and development. The pack cost 67 cents and is now held by the Smithsonian.

The American code had twelve digits and no room for the rest of the world. In 1977 the European Article Numbering association was founded in Brussels with members from twelve countries, and stretched the number to thirteen digits by a trick rather than by widening the symbol: the thirteenth digit is not drawn as bars at all. It is carried in the choice of which of two alternative encodings each of the first six digits uses. An EAN-13 symbol is therefore the same width as the UPC-A symbol it extends, and a UPC-A code is simply an EAN-13 that begins with zero. EAN International and the Uniform Code Council converged, and from 2005 both operated worldwide under one name: GS1.

Key properties

  • An EAN-13 is a GTIN-13: a three-digit GS1 prefix, a company prefix, an item reference and one check digit, thirteen digits in all.
  • The check digit makes the weighted sum of all thirteen digits a multiple of 10. GS1 assigns the weights from the right: the check digit itself weighs 1, the digit to its left 3, then 1, 3 and so on. On a thirteen-digit code that leaves weight 1 on the leading digit.
  • Because the weights are anchored at the right-hand end, left-padding a code with zeros never changes its check digit. That is why the same number can be stored as a GTIN-12, GTIN-13 or GTIN-14 without recalculation.
  • The leading digit is not printed as bars. It is encoded indirectly, in the pattern of choices between two encodings for each of the six left-hand digits, which is what keeps the symbol the same width as a twelve-digit UPC-A.
  • An EAN-13 beginning with 0 is a UPC-A code with a zero prepended, and the EAN-13 and UPC-A check-digit rules agree on such a code.
  • GS1 prefixes 020–029 and 200–299 issue restricted circulation numbers within a geographic region, and 040–049 within a single company, so none of them identifies a globally registered trade item.
  • GS1 lists prefix 952 for demonstrations and examples of the GS1 system.
  • Prefix 977 carries serial publications (ISSN), 978 and 979 carry books and sheet music under the Bookland convention, and 980 carries refund receipts.

Where they turn up

  • Retail point-of-sale scanning worldwide: the digits printed under the bars on a grocery item are almost always an EAN-13 or the UPC-A it extends.
  • Book back covers, where the 978 and 979 Bookland prefixes make an ISBN-13 a valid EAN-13, so a bookshop and a supermarket can use the same hardware.
  • Magazine and journal barcodes, which use prefix 977 to carry an ISSN and normally sit next to a small two-digit add-on symbol giving the issue number.
  • Supply-chain messaging: GS1 standards identify a trade item by its GTIN, so the same thirteen digits travel from the manufacturer through the distributor to the shelf edge label.
  • Open product databases such as Open Food Facts are keyed on the EAN-13, which is how a phone app can name a product and list its ingredients from a scan.
  • Self-checkout and inventory apps validate the check digit locally before any lookup, because it catches most mis-keyed digits without a round trip to the server.

How to use this generator

The generated values appear at the top, with a copy button beside them. To turn them into an image, pick a look from the style presets under Make an image, choose an export size, and download as PNG, JPEG or WebP. Everything is rendered in your browser, so nothing you generate is sent to a server.

The address bar updates as you work, so the link always reproduces exactly what you see — handy for sharing a specific sequence or saving a configuration for later. Use Copy to take the values as plain text, or Export data for CSV, JSON, NDJSON, SQL or XML.

Sources

Historical summaries on this page draw on the openly licensed references listed above. Spotted an error? Tell us and we will fix it.