EAN-13 Barcode Generator with Check Digit & Batch Print
Type a number and get a scannable EAN-13 or EAN-8 barcode instantly. The check digit is calculated for you, and if you already have a full number it's verified against the GS1 formula so a typo doesn't slip through.
Published: / Published by the HakoTools team
Generate several barcodes at once (for printing)
How it works
What does this barcode generator do?
It generates EAN-13 and EAN-8 barcodes and handles the check digit for you two ways: give it the data digits and it calculates the check digit, or paste a full number and it verifies the check digit against the standard formula instead of trusting it blindly. Output comes as SVG or PNG, and a batch mode lays out several barcodes at once for printing on a label sheet.
How to use it
- Pick a format: EAN-13 (12 data digits) or EAN-8 (7 data digits)
- Type the digits. Enter the data digits alone and the check digit is added automatically, or enter the full number (data plus check digit) and it gets verified
- Press Generate barcode to see the preview
- Adjust bar width, height, or whether digits are shown below the bars (no need to regenerate)
- Download as PNG (screens, digital use) or SVG (print, scaling up)
To print several barcodes with the same settings, scroll to Generate several barcodes at once (for printing), paste one number per line, and use the print button that appears once results are ready.
How is the check digit calculated?
EAN-13 and EAN-8 both use GS1's modulus-10, weight-3 checksum. Starting from the digit immediately to the left of the check digit and moving left, multiply alternating digits by 3 and 1, add the products, and subtract the result (mod 10) from 10 — using 0 instead of 10 when the remainder is already 0.
Worked example for the 12-digit EAN-13 data 501234567890: weighting each digit 3, 1, 3, 1, … from the left gives a sum of 90. 90 mod 10 is 0, so the check digit is 10 − 0 = 0, making the full number 5012345678900.
| Position | Digit | Weight | Product |
|---|---|---|---|
| 1 | 5 | ×1 | 5 |
| 2 | 0 | ×3 | 0 |
| 3 | 1 | ×1 | 1 |
| 4 | 2 | ×3 | 6 |
| 5 | 3 | ×1 | 3 |
| 6 | 4 | ×3 | 12 |
| 7 | 5 | ×1 | 5 |
| 8 | 6 | ×3 | 18 |
| 9 | 7 | ×1 | 7 |
| 10 | 8 | ×3 | 24 |
| 11 | 9 | ×1 | 9 |
| 12 | 0 | ×3 | 0 |
EAN-8 has 7 data digits (an odd count), so the weight assignment shifts by one position compared with EAN-13's 12. This tool runs the same formula for both, so you never need to do it by hand.
What do the guard bars mean?
An EAN-13 barcode is 95 modules wide. Fixed patterns called guard bars mark the start (101), middle (01010), and end (101) so a scanner can find the code and tell where it splits into two halves. The first digit of an EAN-13 is never drawn as bars at all — it is encoded indirectly, in which of two parity patterns (L-code or G-code) each of the next 6 digits uses.
The leading digit 5 sits outside the bars entirely — it is recovered from the L/G parity pattern of the first 6-digit block, not printed as its own set of stripes.
EAN-13 vs UPC-A vs Code 128 — which do I need?
| Format | Digits | Where it's used | Supported here |
|---|---|---|---|
| EAN-13 | 13 (12 + check) | Retail, most countries outside North America | Yes |
| EAN-8 | 8 (7 + check) | Small packaging where EAN-13 doesn't fit | Yes |
| UPC-A | 12 | Retail, US and Canada | No — use EAN-13 with a leading 0 |
| Code 128 | Variable, any ASCII | Shipping labels, internal tracking | Not yet |
A UPC-A number is compatible with EAN-13 scanners when read as an EAN-13 with a leading 0, so this tool covers that case without a separate UPC-A mode.
Can I license my own number, or is this only for internal use?
A real, sellable EAN-13 starts with a GS1 company prefix assigned to a specific business by a GS1 member organization (GS1 US, GS1 UK, and so on); the rest of the number is that business's own item codes plus a check digit. Typing in an unassigned number and printing it does not make it a valid retail barcode — a store's point-of-sale system checks it against the real registry. This tool is built for cases that don't need that registration: internal inventory tags, event badges, asset labels, or anything else where the number only needs to be internally consistent.
What's the recommended print size?
EAN-13's nominal (100%) size has a module width (the "X dimension") of 0.33mm and a total bar width of about 37.29mm, per the GS1 General Specifications. Shrinking below that makes the narrowest bars harder for a scanner to resolve; the bar width setting here is in pixels on-screen, so scale it to your printer's resolution rather than assuming the on-screen size matches the printed size. A quiet zone (blank margin) is required on both sides for the scanner to find the start and end guards, and this tool adds one automatically to both the SVG and PNG output — don't crop it out when placing the barcode in a design.
Is the data I enter sent anywhere?
No. Encoding, check-digit calculation, and the PNG/SVG export all run in your browser's JavaScript. Nothing you type is transmitted to a server.
What else can I make with the other free tools?
Need to encode a URL or longer text instead of a plain number? Use the QR code generator, which also lets you set the error correction level and checks color contrast before you print. To resize a downloaded barcode image for a layout, the image resizer handles that.
Notes
- JAN-13 is Japan's domestic name for the same EAN-13 symbology — if you're following a Japanese source that says "JAN", it's this format
- A real EAN-13/EAN-8 number requires a GS1-assigned company prefix; see above for what this tool is meant for instead
- Code 128 isn't supported yet
- All processing happens in your browser; nothing is uploaded
Frequently asked questions
- What's the difference between EAN-13 and UPC-A?
- EAN-13 is the 13-digit international retail barcode used almost everywhere outside North America. UPC-A, used in the US and Canada, is a 12-digit format that is functionally the same symbology read as a 13-digit EAN-13 with a leading 0. This tool generates EAN-13 (12 data digits plus a check digit) and EAN-8 (7 data digits plus a check digit).
- Can I use a barcode I made here on a real retail product?
- Only if the number itself is one you're licensed to use. The first digits of a real EAN-13 are a GS1 company prefix assigned to a specific business by a GS1 member organization (GS1 US, GS1 Japan, and so on); you can't invent one and expect it to work at a store's point of sale. This tool is meant for internal inventory tags, event badges, or any barcode that never has to match a real GS1 registration.
- How is the check digit calculated?
- With GS1's modulus-10, weight-3 formula: starting from the digit next to the check digit and moving left, multiply alternating digits by 3 and 1, add everything up, and subtract the result mod 10 from 10 (using 0 instead of 10). This tool calculates it automatically, and if you paste in a number that already includes a check digit, it verifies that digit instead of silently overwriting it.
- Is Code 128 supported?
- Not yet — only EAN-13 and EAN-8. Code 128's symbol table is large enough that shipping it without being able to verify every width against a primary source felt like the wrong tradeoff, so it's on hold until that verification is done properly.
Related tools
Image
Add Text to Photo
Add captions or meme text to a photo in your browser. Pick a font, color, outline and shadow, then drag each layer into place. Free, no upload, no signup.
Image
Custom Text Emoji Maker for Slack & Teams
Type a word or phrase and turn it into a 128x128 transparent PNG emoji for Slack or Teams. No image upload, no sign-up, runs entirely in your browser.
Image
Scrolling LED Sign Maker for Concerts
Turn your phone into a custom dot-matrix LED sign for concerts and arrivals. Set colors, speed and orientation, then go fullscreen. Free, no app, no sign-up.
Image
Photo Sheet Layout: Fit Multiple Photos on One Print
Lay several photos onto one 3.5x5, 5x7 or A4 sheet at true physical size, with a white border, cut guides and a chosen dpi. JPEG or PDF, in your browser.