Make a barcode you can print and scan
Generate Code 128 or EAN-13 barcodes free as PNG, with the check digit worked out for you. No signup, and your product data never leaves the browser.
How it works
Code 128 maps each character to one of 106 eleven-module patterns, adds a checksum that is a position-weighted sum of the symbol values taken modulo 103, and closes with a thirteen-module stop pattern. EAN-13 is stricter: the check digit comes from alternating weights of one and three across the first twelve digits, and the leading digit is not drawn at all but encoded in which of two alphabets each of the next six digits uses.
What to watch out for
The thirteen digits identify a company and a product through GS1, the body that issues them. Making one up produces a barcode that scans perfectly and means somebody else's product, or nothing at all. For internal use — stock, assets, shelves, files — Code 128 is the right choice and needs no registration.
Code 128 has a mode that packs two digits into one symbol, which halves the width of a long number. It is not implemented, because it means tracking mode switches and every extra path is another way to produce a barcode that scans as something other than what it shows. A wider symbol is a cost you can see; a wrong one is not.
Bars that are too narrow bleed into each other on an inkjet, and scaling the image in a word processor can drop entire columns of pixels. Print at 100% with the narrowest bar at least 0.25 mm, keep the white margin at both ends, and never stretch the image horizontally on its own.
Code 128 encodes printable ASCII only, so an item name with an accent, a Cyrillic reference or an emoji is refused rather than silently mangled. A QR code holds any text and is the answer where the value is not plain ASCII.
Limits
Files up to about 1 MB work reliably. Beyond that, the ceiling is your device's memory rather than any rule we impose — the work happens on your own machine. Tested in Chrome 140, Firefox 143, Safari 18.
Which of the two you want
Code 128 encodes any printable ASCII text and is what you want for anything internal: asset tags, shelf labels, job numbers, file references, event tickets, library stock. Nobody has to issue you anything. The barcode is as long as the text you put in it.
EAN-13 is the thirteen-digit number on the back of a retail product. It is fixed length, digits only, with the last digit computed from the other twelve.
If you are labelling your own things, use Code 128. If you are putting a product on a shop’s shelf, you need EAN-13 — and you need the number to have been issued to you.
The part people get wrong about EAN-13
An EAN-13 is not a format you can fill in. It is an identifier allocated through GS1, the organisation that issues company prefixes, and the digits say which company and which product.
Typing thirteen plausible digits gets you a barcode that scans flawlessly and either means nothing or means somebody else’s product. Shops will reject it, and if it happens to collide with a real allocation the result is worse than rejection.
So this tool will draw one, because there are legitimate reasons to — reprinting a damaged label, testing a scanner, checking a number you were given. It will not pretend an invented number is usable.
What it does do is work out the check digit. Give it twelve digits and it appends the thirteenth. Give it thirteen and it verifies the last one, telling you if the number is mistyped — which is exactly what that digit exists for.
Why the check digit exists
The final digit of an EAN-13 is not part of the identifier. It is arithmetic on the other twelve: multiply them alternately by one and three, add them up, and the check digit is whatever takes the total to a multiple of ten.
That single digit catches every single-digit error and most transpositions of adjacent digits, which are the two mistakes people make when reading a long number aloud or typing it in. It is a small, old, very effective idea.
Printing, which is where barcodes actually fail
Almost every barcode that will not scan was fine as a file and broken by the printing.
Print at 100%. Scaling to “fit the page” resamples the image and can delete whole columns of pixels, which merges two bars into one. Keep the narrowest bar at 0.25 mm or wider — that is roughly two pixels at 200 dpi, which is why the width control here starts at two.
Leave the white space at both ends alone. Like a QR code’s margin, it is how the scanner finds where the symbol begins.
And never stretch a barcode horizontally on its own. Taller is harmless and sometimes helps; wider without taller changes the bar ratios and is precisely what the reader measures.
Nothing is uploaded
The patterns are computed and drawn in your browser. Stock lists, asset registers and customer references are ordinary things to put in a barcode and ordinary things not to hand to a stranger’s server on the way to a PNG.
Your files never leave your browser. Last updated 2026-08-02.
Related tools
- Make a QR code that stays yoursType a link, a message or a Wi-Fi password and get a free QR code as PNG or SVG. No account, no expiry, no tracking redirect, and nothing is uploaded.
- Generate passwords that never leave this pageStrong random passwords generated free by your own browser from the operating system's cryptographic source. Nothing is transmitted, logged or stored.
- Make a PDF from a folder of imagesDrop in a mixed pile of JPG, PNG and WebP images and get one PDF, free and with no file limit. Everything is converted inside your own browser.