Symbologies
EAN-13 barcode generator
A 13-digit GTIN with a valid check digit becomes an EAN-13 image address.

An EAN-13 is the retail barcode for a 13-digit GTIN, the number on most products sold outside North America. Beepable draws one only when the last digit, the check digit, matches the other twelve. It never fills in or changes a digit. The result is a picture address you can use in a spreadsheet, a document, or a label tool.
How do I generate an EAN-13?
- Take all 13 digits from GS1 or from the pack, including the check digit.
- Try the code on the barcode form. With auto, a valid 13-digit GTIN is drawn as an EAN-13.
- For a column of codes, put the GTIN in A2, your picture key in Z1, and this formula in B2:
=IMAGE("https://beepable.app/i/ean13.png?v="&ENCODEURL(A2)&"&k="&$Z$1) - To print the digits under the bars, use this version instead:
=IMAGE("https://beepable.app/i/ean13.png?v="&ENCODEURL(A2)&"&hrt=1&k="&$Z$1) - Scan one printed barcode and compare the digits with the pack before the print run.
Writing ean13 in the formula makes the column strict: a 12-digit code shows a card instead of quietly becoming a UPC-A. Use auto when one column mixes lengths.
How does the check digit work?
The check digit is the last digit. Take the other twelve, multiply them from the right by 3, 1, 3, 1 and so on, and add them up. The check digit is the number that brings that sum up to the next multiple of 10. For 400638133393, the weighted sum is 89, so the check digit is 1, and the GTIN is 4006381333931.
If the last digit does not match, the barcode is refused. That protects you from printing a symbol that scans as a different product. A spreadsheet that stored the GTIN as a number may already have changed it, so format the column as text and compare with the pack.
What if the cell shows a card?
| The cell shows | Why | What to do |
|---|---|---|
| Check digit is invalid for this GTIN. Name code128 to encode it anyway. | The last digit does not match the other digits. | Copy the code again from its source. Beepable never makes up a check digit. |
| EAN-13 needs 13 digits. This has 12. | The formula says ean13, but the code is a UPC-A, or a digit is missing. | Use auto, or fix the code. |
| This barcode needs an API key. | Z1 is empty, or the formula does not point at it. | Paste your picture key in Z1, and keep both dollar signs in $Z$1. |
| This API key has been revoked. | The key was revoked on the Account page. | Create a new picture key and paste it in Z1. |
The Excel guide covers every card and the full sheet setup.
What should the scanner see?
The picture is black bars on white with a white margin, the quiet zone, on both sides. Keep that margin when you place the picture in a layout. With hrt=1, the 13 digits are printed under the bars. The same digits always give exactly the same picture.
An EAN-13 is only for a GTIN you were assigned. A SKU belongs in a Code 128. For Sunrise 2027, keep this EAN-13 and add a QR code of a GS1 Digital Link beside it, as the dual-coding guide explains.
How do I use it from a program?
A PIM can send its GTINs to the batch route with an All routes key and store the returned image address. The API guide shows the request. HTTP 400 on a single lookup means the digits are wrong, 401 means the key is missing or revoked, and 403 means a picture key was used where an All routes key is needed.
Frequently asked questions
Is an ISBN an EAN-13?
Yes. An ISBN-13 such as 9780306406157 is a 13-digit GTIN. With a valid check digit it is drawn as an EAN-13.
Does Beepable complete a missing check digit?
No. A wrong check digit is refused with: Check digit is invalid for this GTIN. Name code128 to encode it anyway. Take the full 13 digits from GS1 or from the pack.
What if I have 12 digits?
A 12-digit GTIN is a UPC-A, and auto draws it as one. If the formula says ean13, the cell shows a card instead, because EAN-13 needs 13 digits.
Can I print the digits under the bars?
Yes. Add &hrt=1 to the address before &k=. The digits are drawn from the same value as the bars.
How big should I print it?
The nominal size is 37.29 × 25.93 mm at 100%. Retail allows 80% to 200%. Do not crop the white margins on either side.



