This free barcode generator makes real, scannable barcodes from any text or number — EAN-13 product codes and Code 128 labels — right in your browser. Type your number, pick the barcode type, and download the result as a print-ready SVG or PNG. No sign-up, nothing uploaded, and the barcode works with any standard scanner.
EAN-13 takes exactly 12 digits — the 13th check digit is worked out for you. Code 128 takes letters, numbers and symbols (up to 48 characters). The barcode is drawn in your browser; nothing is uploaded.
How to Use the Barcode Generator
- Pick EAN-13 for a 12-digit product number, or Code 128 for letters, numbers and symbols.
- Type your text or number. For EAN-13, enter exactly 12 digits — the barcode generator works out the 13th check digit for you.
- Click Generate Barcode. The barcode generator draws the bars and shows the full code underneath.
- Download the barcode as SVG (best for print) or PNG (best for documents and labels).
What Is a Barcode?
A barcode is a picture that a scanner can read as a number or a piece of text. The black bars and white spaces have different widths, and each width pattern stands for one character — a digit, a letter or a symbol. A laser or camera scanner reads the widths from left to right and turns them back into the original text. That is why the same barcode works on a shop till, a warehouse scanner and a phone app: they all read the same widths. GS1, the organisation that runs the world’s product-number system, explains how barcodes carry product, shipment and location identifiers through the supply chain — the short version is that a barcode is just a number you can print.
Barcodes beat typing for one simple reason: they remove mistakes. A cashier typing a 13-digit product code will get it wrong sometimes; a scanner reading a printed barcode almost never does. That is why shops, warehouses, libraries and hospitals print barcodes on almost everything they handle. The barcode generator on this page makes the same standard barcodes — EAN-13 and Code 128 — so a barcode you print here scans like one from any professional system.
Barcode Types: EAN-13, UPC-A and Code 128
There are many barcode types, but three cover almost everything you will meet. EAN-13 is the product barcode on shop shelves outside North America: 13 digits, the first few showing the country and company, and a final check digit that catches typing mistakes. UPC-A is the American version of the same idea, with 12 digits — it is really an EAN-13 with a leading zero, so a UPC-A number works in this barcode generator if you add a 0 at the front and let it make the check digit. Code 128 is the general-purpose barcode: it encodes letters, numbers and symbols, which is why warehouses print it on boxes, labels and asset tags.
| Barcode type | What it holds | Where you see it |
|---|---|---|
| EAN-13 | 13 digits (12 + check digit) | Product packaging worldwide |
| UPC-A | 12 digits (US product code) | Product packaging in the USA and Canada |
| Code 128 | Letters, numbers and symbols | Warehouse labels, boxes, asset tags |
Barcode Generator Example
Say you have a product number 590123412345 and you need an EAN-13 barcode for the packaging. Type the 12 digits into the barcode generator and pick EAN-13. The tool works out the check digit — 7 — and draws the barcode for the full 13-digit code 5901234123457. The check digit is not random: it is calculated from the other 12 digits, so a scanner can tell if a single digit was typed wrong. Print the barcode at least 3 cm wide with a plain white background and a quiet zone — blank space — of a few millimetres on both sides, and any shop scanner will read it.
For a warehouse label, the job is different: the code might be a shelf location like “A12-B4” or a product name like “HELLO”. That is Code 128 work. Type the text, pick Code 128, and the barcode generator adds the start code, a check symbol and the stop pattern automatically — the check symbol is a weighted total of all the characters, worked out modulo 103, so the scanner can verify the whole code in one pass. Download the SVG for print, because it stays sharp at any size, and use the PNG when the barcode goes into a document or an email.
How to Print a Barcode That Scans
A barcode that looks right can still fail to scan if it is printed too small or too faint. Keep the bars at least 80% of their normal size — for EAN-13 that means about 3 cm wide — and print in solid black on plain white. Never stretch the barcode sideways or squash it, because scanners measure the widths of the bars, and stretching changes every width at once. Leave blank space on both sides: scanners need that quiet zone to know where the barcode starts and ends.
Paper matters too. Glossy labels reflect the scanner’s light and can confuse it, so matt paper or matt labels scan more reliably than shiny ones. If the barcode goes on a curved surface, like a bottle, keep it small enough to sit flat, and print a test copy first — scan it with a phone app before you print a hundred. The download from this barcode generator is a clean vector file, so it prints sharp on any printer, from an office inkjet to a label printer.
Frequently asked questions
What is the check digit on an EAN-13 barcode? The check digit is the 13th digit, calculated from the first 12. The barcode generator works it out automatically: add the digits in odd positions, add three times the digits in even positions, and the check digit is what brings the total up to the next multiple of 10. For 590123412345 the check digit is 7, giving the full code 5901234123457.
Can I use a UPC-A number in this barcode generator? Yes. A UPC-A code has 12 digits, and it is the same as an EAN-13 with a 0 at the front. Add a leading 0 to make 12 digits, enter them as EAN-13, and the tool adds the check digit for you.
Does the barcode generator store my text or numbers? No. The barcode is drawn in your browser, and nothing you type is sent to a server or saved anywhere.
Will a barcode from this tool scan in a shop? Yes, if you print it at the right size in solid black on white, with blank space on both sides. Test it with a phone scanner app before printing a large run, and use the SVG download for the sharpest print.
What is the difference between a barcode and a QR code? A barcode (1D) holds a short code in a row of bars and is read by a laser or camera scanner; a QR code (2D) holds much more data in a square of dots and is read by a phone camera. This barcode generator makes 1D barcodes; the QR code generator on this site makes QR codes.
Related tools: QR Code Generator, Case Converter, Word Counter.

