EAN-13 structure explained
An EAN-13 is thirteen digits, and this site's validator reads them as three regions: a three-digit GS1 prefix, a nine-digit middle, and a final check digit. Two of those regions sit at fixed, knowable positions. The third does not — and the point of this guide is to be precise about which is which, because most misreadings of a barcode number come from treating a guess as a fact. Every figure below is computed at build time by the engine behind the EAN-13 generator and its live breakdown panel; the examples are published reference numbers cited in the test suite or fictional numbers labelled as such. This is one of the guides to the verification layer.
Three regions, two of them fixed
The breakdown function takes twelve or thirteen digits and returns them segmented: the first
three as the GS1 prefix, the next nine as the body, and the check digit those twelve digits
require. Take the published EAN-13 walkthrough number — data digits 400638133393,
cited in this site's tests. The engine computes its check digit as
1, completing 4006381333931. Segmented, that number reads:
GS1 prefix 400 · manufacturer + product
638133393 · check digit 1
Entered as all thirteen digits, the status is verified; the prefix classifies as standard.
Computed at build time by the same function the breakdown panel runs on every keystroke, so this page cannot disagree with the tool.
What is knowable from the number alone: the first three digits are the GS1 prefix, and the last digit is arithmetic over the other twelve. What is not knowable is where, inside the middle nine, one meaning ends and the next begins — so the engine refuses to pretend.
Why the middle nine digits are one region
Inside the body sit the licensed company prefix followed by the item reference. The boundary between them depends on the length of the company's licensed prefix, and that length is not recoverable from the number itself. A tool that draws a line through the middle is guessing, and a guess drawn in colour looks like a fact. The engine therefore reports the middle as one nine-digit region — "manufacturer + product" in the breakdown panel — and its own note says that where one ends and the other begins "depends on the license length, so it cannot be read off the number itself."
This is also where the guide stops on licenses: which prefix lengths exist and who allocates them are questions for GS1, not for arithmetic. The methodology page puts it as symbols, not numbers: generating an EAN-13 barcode does not allocate or license the GTIN inside it. If that is the question you need answered, start with Do I need a GS1 barcode?
What the first three digits do and do not say
The prefix is classified by a deliberately narrow function. It recognises only the ranges GS1 publishes for the whole symbology, and the ranges quoted here are not typed in: when this page was built the classifier was run over all 1000 three-digit prefixes. It returns ISSN for 977 (serial publications), Bookland ISBN for 978–979, and restricted circulation for 020–029, 040–049 and 200–299 — 123 prefixes in all. The remaining 877 are reported as "standard" — an ordinary GS1 member organization prefix — and nothing more. In particular the engine never names a country: a GS1 prefix identifies the member organization that issued the company prefix, not the country of manufacture. Here is the classifier's verdict at each range's boundaries and the prefixes just outside them:
| GS1 prefix | Classification |
|---|---|
019
|
standard |
020
|
restricted circulation |
029
|
restricted circulation |
030
|
standard |
039
|
standard |
040
|
restricted circulation |
049
|
restricted circulation |
050
|
standard |
199
|
standard |
200
|
restricted circulation |
299
|
restricted circulation |
300
|
standard |
976
|
standard |
977
|
ISSN |
978
|
Bookland ISBN |
979
|
Bookland ISBN |
980
|
standard |
Four numbers show the classes in use. 5901234123457, the widely published
sample EAN-13, has prefix 590 and classifies as standard.
9780306406157, the canonical ISBN example in its EAN-13 form, has prefix
978 and classifies as Bookland ISBN — see the
ISBN barcode generator and the
ISBN conversion guide. A fictional 2001234567893 (check digit
3, computed) has prefix 200 and classifies as
restricted circulation — a range the engine marks as in-store and internal, which the
in-store barcode guide explains. And a fictional
9771234567003 (check digit 3, computed) has prefix
977 and classifies as ISSN.
The check digit: computed or verified, never repaired
The thirteenth digit is the GTIN mod-10 check digit — weights 3 and 1 anchored at the rightmost data digit — and the engine works in two explicit modes. Enter twelve digits and it computes the thirteenth and says so. Enter thirteen and it verifies the one you typed against the first twelve. For the cited vector the weighted products sum to 89; the next multiple of ten is 90; the difference, 1, is the check digit. The check-digit guide walks through the weights position by position.
The validator's own notes make the mode visible. Twelve digits entered:
You entered 12 digits — the check digit 1 was computed and appended, making 4006381333931.
Thirteen digits entered:
You entered all 13 digits — the check digit 1 was verified against the first 12 and is correct.
What the engine will not do is repair. Change the final digit of the cited number to
2 and the breakdown reports status mismatch: the supplied
check digit is 2, the expected one is 1, and the
structurally valid completion 4006381333931 is offered in a separate field
while the input stays as typed. On the generator the same input stops the flow with this error, and
no bars are requested:
Check digit mismatch: for 400638133393 the final digit must be 1, but you entered 2. Fix the number, or enter only the first 12 digits to have the check digit computed.
A check digit is derived from the other twelve digits, so a mismatch does not tell you which of
the thirteen is wrong — only that they disagree. Take a fictional number,
7310000123450 (check digit 0, computed). Change
one digit in the body, giving 7310000723450, and the breakdown reports
mismatch with an expected check digit of
2. The last digit never changed; a data digit did. "Correcting" the
check digit would produce 7310000723452 — a structurally valid, entirely
wrong number — and the detectable error would be gone. So the engine reports and stops.
Leading zeros and the first digit
A consequence of the arithmetic, computed rather than asserted: a leading zero does not change
the check digit. The cited UPC-A walkthrough data 03600029145 gets check digit 2 from the UPC-A function. Put a zero in front to make twelve data digits,
003600029145, and the EAN-13 function computes 2 — the same digit
— while the breakdown reads the completed 0036000291452 as prefix 003 (standard) with body
600029145. The methodology page lists this among the properties the test
suite pins: every computed check digit re-verifies, single-digit corruptions are caught, leading
zeros do not change GTIN checks. The UPC-A generator runs the same arithmetic.
How the validator reads what you paste
Before anything is classified, the input is normalised. Spaces and hyphens are stripped: pasted
as 400 6381-33393 1, the cited number is read as 4006381333931
and its status is verified. Then the length and character rules are
enforced. Seven digits:
Enter 12 digits (check digit computed) or 13 (check digit verified) — currently 7.
A letter among the digits:
An EAN-13 contains digits 0–9 only (spaces and hyphens are ignored).
Only then is the check digit computed or verified, and only an accepted payload reaches the
renderer — the methodology's order is normalise, enforce the symbology's length and character
rules, compute or verify with independently implemented arithmetic, and stop on a mismatch so
that no bars are requested. The accepted payload is then cross-checked once more by re-deriving
its check digit; for the cited number that cross-check returns
true. On the generator and the breakdown panel, twelve digits are
always read as data digits awaiting a check digit; the
bulk validator follows a different, documented rule for twelve-digit
lines, explained in the
bulk validation guide.
Where the structure reading stops
Two limits, in the methodology's terms. Math, not optics. The engine verifies digits; whether a printed symbol scans depends on contrast, size, substrate and preserved quiet zones. Where this site quotes a physical figure at all — EAN-13's quiet zones of 11 and 7 module widths — it comes from a GS1 member organization size guide such as GS1 Sweden's, linked where used; everything else about printing stays qualitative. Symbols, not numbers. A number that passes every check on this page is structurally valid, which is a property of arithmetic; it says nothing about whether the number is licensed or registered. How the digits become bars, and how the rendered symbol is independently decoded before download, is covered on the EAN-13 generator page and in how the verifier decodes what you see.
Common misreadings
- The first digits name the country of manufacture. They identify the GS1 member organization that issued the company prefix — nothing more.
- The middle can be split by eye. The boundary between company prefix and item reference depends on the license length and is not in the number; the engine reports one region.
- A correct check digit means the number is real. It means the thirteen digits are internally consistent — nothing more.
- A wrong check digit should be fixed and forgotten. The disagreement may be anywhere in the thirteen digits; the engine shows the expected digit and leaves the input alone.
EAN-13 structure FAQ
What are the three parts of an EAN-13 number?
The first three digits are the GS1 prefix, the next nine are the manufacturer + product region, and the last digit is a check digit computed from the other twelve. For the cited 4006381333931 the engine reports prefix 400, body 638133393 and check digit 1.
Can the company prefix be read off the number?
No. The boundary between company prefix and item reference depends on the length of the licensed company prefix, which is not recoverable from the number alone, so the breakdown reports the middle as one nine-digit region instead of a guessed split.
Does the GS1 prefix tell me where a product was made?
No. The prefix identifies the GS1 member organization that issued the company prefix, not the country of manufacture. The engine classifies only the ranges GS1 publishes for the whole symbology — 977 as ISSN, 978–979 as Bookland ISBN, 020–029, 040–049 and 200–299 as restricted circulation — and reports every other prefix as standard without inventing a meaning.
Why does the tool refuse to fix a wrong check digit?
Because a mismatch only says the thirteen digits disagree, not which one is wrong; correcting the last digit would turn a detectable error into a structurally valid wrong number. For 4006381333932 the engine reports that the check digit should be 1, not 2, offers 4006381333931 in a separate field, and leaves the input as typed.
What happens when I paste a number with spaces or hyphens?
They are stripped before anything else: 400 6381-33393 1 is read as 4006381333931 and verifies. The validator then enforces the length and character rules, computes or verifies the check digit, and stops on a mismatch before any bars are requested.
If a number passes every check here, is it a valid retail barcode?
It is structurally valid — right length, digits only, check digit consistent — which is a property of arithmetic. Generating an EAN-13 barcode does not allocate or license the GTIN inside it; that is GS1’s role, covered in the site’s guide on whether you need a GS1 barcode.
Math, not optics: this guide, and the engine it describes, verify digits and character sets. Whether a printed symbol scans depends on contrast, size, substrate and preserved quiet zones, so test a printed sample with your own scanner before production or print use. See the methodology page for the full boundary between the renderer and the verification layer.