Free GTIN Converter
Paste any UPC-E, UPC-A, EAN-8, EAN-13, GTIN-14 or ISBN and see every equivalent form, with check digits recomputed for each length. Nothing leaves your browser.
Paste any UPC-E, UPC-A, EAN-8, EAN-13, GTIN-14, ISBN-10 or ISBN-13. Spaces and hyphens are ignored. Nothing is uploaded — the conversion runs entirely in this browser.
Only affects the GTIN-14 row. Changing it changes the check digit, which is why a case code is not just the item code with a digit stuck on the front.
How the Conversion Works
UPC-A, EAN-13, EAN-8 and GTIN-14 are not different numbering systems. They are four lengths of one number, the GTIN (Global Trade Item Number), defined in the GS1 General Specifications. GS1 calls them GTIN-12, GTIN-13, GTIN-8 and GTIN-14. Converting between them is mostly a matter of adding leading zeros — and then recomputing the check digit, because the check digit depends on how many digits sit to its left.
That gives a rule worth internalising: a GTIN is only ever compared after padding to
14 digits. The UPC-A 042100005264
and the GTIN-13 0042100005264 are the same
product, and a database that stores one but is queried with the other will report a miss that
is not real.
The check digit
Every GTIN length uses the same modulo-10 rule. Starting from the digit immediately left of the
check digit and working leftwards, multiply alternately by 3 and 1, add the results, then
subtract the total from the next multiple of ten. For
04210000526 the weighted sum is 46, the next
multiple of ten is 50, and the check digit is 4.
ISBN-10 is the exception. It predates GS1 and uses a modulo-11 rule with weights 10 down to 2,
which is why an ISBN-10 can end in X — the
Roman numeral for a check value of ten. An ISBN-13 never can.
UPC-E, the awkward one
UPC-E is the short barcode on small items — lip balm, single-serve drinks, cigarette packs. It carries eight printed digits but represents a full twelve-digit UPC-A. It does this by zero suppression: a UPC-A with a long run of zeros in the middle can be written more compactly, and the last data digit records which pattern of zeros was removed so a scanner can put them back.
There are four rules, chosen by that last data digit. Below, N is the number system digit (0 or 1), D1–D6 are the six data digits, and C is the check digit.
| Last data digit | Expands to | Example UPC-E | Example UPC-A |
|---|---|---|---|
| 0, 1, or 2 | N D1 D2 [D6] 0 0 0 0 D3 D4 D5 C | 0 425261 4 | 0 42100 00526 4 |
| 3 | N D1 D2 D3 0 0 0 0 0 D4 D5 C | 0 456783 4 | 0 45600 00078 4 |
| 4 | N D1 D2 D3 D4 0 0 0 0 0 D5 C | 0 456784 0 | 0 45670 00008 0 |
| 5 to 9 | N D1 D2 D3 D4 D5 0 0 0 0 [D6] C | 0 123456 5 | 0 12345 00006 5 |
Two consequences most converters get wrong. First, the check digit printed under a UPC-E is the check digit of the expanded UPC-A, not of the eight digits you can see — so validating a UPC-E means expanding it first. Second, the compression is not reversible for every input: several zero-heavy UPC-E values expand to the same UPC-A, so converting a UPC-A back to UPC-E returns the canonical form, which is not always the string you started with. This tool tells you when that happens rather than silently returning a different number.
A Worked Example
You scan a small bottle and your phone shows 04252614. Eight digits. You paste it into a product database and get nothing back, because the database indexes twelve-digit UPC-As.
- Split it: number system 0, data digits 425261, check digit 4.
- The last data digit is 1, so rule one applies: keep D1 and D2, insert the last data digit, then four zeros, then D3, D4 and D5.
- That gives 0 42 1 0000 526 — a UPC-A body of 04210000526.
- Weighted sum: (6×3)+(2×1)+(5×3)+(0×1)+(0×3)+(0×1)+(0×3)+(1×1)+(2×3)+(4×1)+(0×3) = 46. Check digit 4, which matches the digit printed on the pack — so the scan was clean.
- The full UPC-A is 042100005264. As a GTIN-13 that is 0042100005264; as a GTIN-14 case code with indicator 1, 10042100005261.
Every one of those five numbers identifies the same product. Which one a system wants depends entirely on the system.
Look closely at the last one. The GTIN-14 ends in 1, not the
4 the item number ends in. Putting the indicator digit on the front pushed
every other digit one position along, which flips whether it is weighted by 3 or by 1, so the
whole sum changes. Writing 10042100005264 on
a case label — the item number with a 1 stuck in front — produces a code that looks right,
prints fine, and fails validation at the first receiving dock that checks it. This is the
single most common error in hand-built case codes.
When You Actually Need This
- A scan came back too short. Phone scanners report UPC-E as the eight digits printed on the pack. Product databases, marketplaces and your own ERP almost always want the twelve-digit UPC-A. Expanding is the missing step.
- A marketplace rejected your product identifier. Listing forms differ on which length they accept, and some validate the check digit while others silently truncate. Seeing all the forms side by side usually shows immediately which one the form wanted.
- You are building a case or pallet code. A GTIN-14 is the item's GTIN-13 with an indicator digit in front and a recomputed check digit. Reusing the item's check digit is one of the most common label errors, and it produces a code that scans cleanly and means nothing.
- You are matching two product catalogues. One stores UPC-A, the other EAN-13, and the join fails on leading zeros. Padding both sides to 14 digits fixes it.
- You are a publisher handling ISBNs. Retailers and metadata feeds still ask for both ISBN-10 and ISBN-13. Only 978-prefixed ISBN-13s have an ISBN-10 equivalent; 979 numbers never did.
What This Tool Does Not Tell You
- Whether the number belongs to anybody. A valid check digit means the digits are internally consistent, not that the GTIN has been issued to a real company for a real product. Only the GS1 registry can answer that.
- Where the product was made. The GS1 prefix at the start of an EAN-13 identifies the GS1 member organisation that issued the company prefix — often the country where the company registered, which is frequently not where the goods were manufactured.
- Whether a compressed UPC-E will print correctly. Compression tells you the number can be written short. Whether the symbol is legible at that size is a printing question, not a numbering one.
Related Tools and Guides
- Validate a barcode check digit →
- Generate a printable EAN-13 barcode →
- Decode a GS1 element string with batch, serial and expiry →
- Barcode lookup: how to find product information →
- Types of barcodes explained →
- GS1 Sunrise 2027 and 2D barcodes at the checkout →
- Using a phone as a barcode scanner for inventory →
Frequently Asked Questions
Why did my scanner give me only 8 digits?
Because the pack carries a UPC-E symbol. UPC-E is a compressed form of a normal 12-digit UPC-A, used on items too small for the full barcode, and scanners report the eight digits that are actually printed. The missing four are runs of zeros that the standard allows to be left out; the last data digit records which pattern was removed so the number can be rebuilt exactly. Paste the eight digits above to get the full UPC-A.
Is a UPC the same thing as a GTIN?
Yes. A 12-digit UPC-A is a GTIN-12, an EAN-13 is a GTIN-13, an EAN-8 is a GTIN-8, and a case code is a GTIN-14. GS1 defines them as four lengths of one identifier rather than four numbering systems, which is why converting between them is mostly a matter of adding leading zeros and recomputing the check digit.
Can I just add a zero to a UPC to make an EAN-13?
For UPC-A to EAN-13, yes — a leading zero is exactly right, and the check digit does not change because no digit moves relative to it. Going to GTIN-14 is different: the indicator digit at the front shifts every other digit one place, so the check digit has to be recomputed. Reusing the item check digit on a case label is one of the most common labelling errors.
What is the indicator digit on a GTIN-14?
It is the first digit, and it says what level of packaging the code identifies. Zero means the base item itself. One through eight identify packaging levels above it — an inner carton, a shipping case, a pallet layer — chosen by the brand owner rather than fixed by the standard. Nine is reserved for variable measure trade items, the kind sold by weight.
Does a valid check digit mean the barcode is genuine?
No, and this is worth being clear about. The check digit only proves the digits are internally consistent, which catches a mistyped digit or a misread scan. It says nothing about whether the number was ever issued to a company, or whether the product is what the label claims. Only a lookup against the GS1 registry can establish that.
Does the first part of an EAN-13 tell me the country of origin?
Not reliably. The GS1 prefix identifies the GS1 member organisation that issued the company prefix, which usually reflects where the company registered rather than where the goods were made. A brand registered in one country routinely manufactures in another, so reading a prefix as a country of manufacture will often be wrong.
Why does the same book have two different check digits?
Because ISBN-10 and ISBN-13 use different rules. ISBN-10 predates GS1 and uses a modulo-11 calculation with weights from 10 down to 2, which is also why an ISBN-10 can end in X — the Roman numeral for a check value of ten. ISBN-13 is an EAN-13 and uses the GS1 modulo-10 rule. Converting between them always means recomputing.
Why does converting a UPC-A back to UPC-E sometimes give a different number?
Because UPC-E compression is not one-to-one. A handful of zero-heavy numbers can be written as UPC-E in more than one way, and all of those expand to the same UPC-A, so there is no way to recover which spelling you started from. This tool returns the canonical form and tells you when it differs from what you entered, rather than quietly handing back a different string.
Is anything I paste here uploaded?
No. The conversion is plain JavaScript running in your browser, with no network requests, no analytics on the input and no storage. That matters if you are working with product codes for a range that has not launched yet.
The Eight Digits Come From a Scan
Small packs carry UPC-E, and a scan of one gives you eight digits that most product databases will not recognise. Scan & Generate reads UPC-E, UPC-A, EAN-13, EAN-8, Code 128, GS1 DataMatrix and seven other formats — 13 in all — and keeps a searchable, exportable history, so you can scan a shelf and expand the numbers here afterwards.