Enter 12 digits for an EAN-13 barcode or 7 for EAN-8 and the check digit is calculated and appended for you. Paste a full code and it is verified instead. The result is drawn from the symbology itself, at correct proportions with quiet zones, and downloads as a crisp SVG or a PNG. Nothing is uploaded.
Enter 12 digits and the check digit is added, or 13 to verify one. Spaces and hyphens are ignored.
Width of the narrowest bar. 3 px suits laser printing.
Enter a number to see the barcode.
How it works
An EAN-13 symbol is 95 modules wide plus quiet zones: a start guard, six digits from the left-hand code sets, a centre guard, six digits from the right-hand set and an end guard. Each digit is seven modules. The clever part is the first digit — it is not drawn at all, but encoded in which of the two left-hand sets (odd or even parity) each of digits 2 to 7 uses, which is why the leading digit is printed outside the bars.
The last digit is a check digit. Digits are weighted 1 and 3 alternately from the right, summed, and the check digit is whatever brings the total to a multiple of ten. For 400638133393 the weighted sum is 89, so the check digit is 1 and the full code is 4006381333931. Enter 13 digits and the tool recomputes the same figure to verify yours; if it disagrees, the error tells you which digit it expected.
EAN-8 works the same way with four digits per half, all from the odd-parity left set and the right-hand set, giving 67 modules plus quiet zones. Both formats keep the empty margins (11 modules left, 7 right for EAN-13) that scanners need to find the symbol. Module width sets the printed size: 3 px per module is a safe starting point for laser printing, and the SVG scales without any loss.
Practical examples
A product code with the check digit added
Enter 400638133393 and the tool appends 1, giving 4006381333931 — the code you see on a real retail pack, printed as 4 | 006381 | 333931.
Verifying a code you already have
Paste 8601234567890 and it fails: the correct check digit for 860123456789 is 9, so the valid code is 8601234567899. A single mistyped digit almost always shows up this way.
A short code for a small label
EAN-8 is for packs too small for a full symbol. Type 9638507 and you get 96385074 in 81 modules — under half the width of an EAN-13.
An in-store code for internal use
Codes starting with 20–29 are reserved for internal, in-store numbering. 200000012345 becomes 2000000123455, usable on your own shelf labels without registering anything.
Frequently asked questions
Can I invent my own barcode number for a product I sell?
Not for retail. GTINs that scan correctly in shops are allocated through GS1, which issues your company prefix; numbers you make up may already belong to someone else. What you can freely use are the in-store codes beginning 20–29, intended for internal numbering.
What does the 860 prefix mean?
It is the GS1 prefix administered by GS1 Serbia, so codes beginning 860 were issued to companies registered there. A prefix identifies where the number was issued, not where the product was made.
How is the check digit calculated?
Weight the digits alternately by 1 and 3 starting from the right, add them, then take the amount needed to reach the next multiple of ten. For EAN-13 that means the leftmost digit has weight 1; for EAN-8 it has weight 3.
Why does the first digit sit outside the bars?
Because it has no bars of its own. It is encoded in the parity pattern of the next six digits, a trick that let EAN-13 extend the 12-digit UPC symbol without making it wider.
What are quiet zones and why do they matter?
They are the empty margins on both sides — 11 modules left and 7 right for EAN-13. A scanner uses them to find the start and end of the symbol, so cropping them off or printing right to the edge of a label is the most common reason a barcode will not read.
Should I download SVG or PNG?
SVG for anything going to print or into a design file: it is vector, so it stays sharp at any size. PNG is convenient for a quick label, a spreadsheet or a web page.
How large should the barcode be printed?
The retail nominal size for EAN-13 is about 37 × 26 mm, and the standard allows roughly 80% to 200% of that. Below that range the bars get too narrow for a typical scanner and the code becomes unreliable.
Can I print it in colour?
Keep dark bars on a light background with strong contrast — black on white is safest. Red bars are effectively invisible to a red-laser scanner, and pale bars on dark backgrounds usually fail too.
Does it make UPC-A codes?
Not directly, but a UPC-A code is an EAN-13 with a leading zero, so entering 0 followed by the 11 digits produces a symbol whose bars match. Only the printed digit layout differs from a true UPC-A label.
What if my number has fewer digits than required?
Retail GTINs are fixed length. Numbers shorter than 12 digits are usually GTIN-8 codes or internal references — pad on the left with zeros only if the number really is a shorter GTIN, otherwise you are creating a different code.
Will the generated barcode scan?
The encoding follows the symbology, so yes, provided you print it at a sensible size, keep the quiet zones and use good contrast. Test with a phone scanner app before ordering thousands of labels.
Is my code sent anywhere?
No. Encoding and drawing happen in your browser, and the SVG and PNG are generated locally — nothing about your product numbers is uploaded.
Related tools
QR Code Generator
Create a QR code from any text or link and download it as PNG or SVG. Generated locally, no watermark, free for any use.
Generators
Wi-Fi QR Code Generator
Make a QR code that connects phones to your Wi-Fi with one scan — no typing the password. Generated locally as PNG or SVG.
Generators
Number Base Converter
Convert whole numbers between binary, octal, decimal and hexadecimal at once. BigInt-precise, in your browser.
Math & education
Hash Generator
Generate SHA-1, SHA-256, SHA-384 and SHA-512 hashes of text in your browser using the Web Crypto API.
Developer tools
Password Generator
Generate strong random passwords with custom length and character sets, using your browser’s cryptographic randomness.
Generators
Random Number Generator
Draw random integers in any range — one number or a whole batch, with or without repeats, in your browser.
Generators