Barcode Generator
Create barcodes online in one click — Code 128, EAN-13, UPC-A and more. Download as SVG, PNG or PDF, or generate up to 100 at once. Free, no signup.
About this tool
This free barcode generator turns any text or number into a scannable Code 128 barcode in one click. Type what you want to encode, and it creates a crisp barcode image you can download as an SVG — no signup, no software to install, and no cost.
Our free tool uses the Code 128 standard, the most widely supported barcode format in the world. It works with almost every handheld scanner and phone scanning app. Everything runs entirely in your browser, so the text you enter never leaves your device.
By Azhar Hussain · Last updated: 7 November 2026
How to use
Pick a barcode format first. Code 128 works for any text or numbers and is the best choice for warehouse labels, asset tags and shipping. For products sold in shops, choose EAN-13 or UPC-A and enter the number without its check digit — the tool works it out and adds it for you. EAN-8 is for small items, and Code 39 handles letters, numbers and a few symbols.
Type your text or number, click Generate Barcode, and your barcode appears below. Download it as SVG for sharp printing at any size, PNG for documents and labels, or PDF for printing. You can also print the page directly from your browser.
To make many barcodes at once, paste up to 100 values in the bulk box — one per line — and click Generate Barcode. You get every barcode on one page, ready to download as a ZIP file or print as a sheet. Test-scan one barcode with your phone before printing a large batch.
The math behind it
Code 128 encodes each character as a pattern of dark bars and light spaces of varying widths. A start symbol tells the scanner which character set is used, then every character becomes an 11-module pattern, and a check digit at the end lets the scanner verify it read the code correctly.
Retail barcodes end in a check digit that catches typing mistakes. It is worked out from the other digits with weights of 3 and 1, alternating from the right: add the weighted digits up, and the check digit is what brings the total up to the next multiple of 10. For example, 590123412345 adds up to 83, so the check digit is 7 and the full number is 5901234123457. A correct check digit only means the number is well-formed — it does not mean the number is officially registered with GS1.
Which barcode type should I use?
If you are labelling your own stock, shelves or equipment, Code 128 or Code 39 is the simplest choice — no registration is needed. If the barcode will be scanned at a shop till, you need a GTIN number registered with GS1 first; a correct check digit alone is not enough.
| Format | Best for | Typical data | Needs GS1 registration? |
|---|---|---|---|
| Code 128 | Internal tracking, shipping, warehouse labels, asset tags | Any letters, numbers and symbols | No |
| EAN-13 | Retail products sold worldwide (outside the US and Canada) | 13 digits (12 + check digit) | Yes — for products sold in stores |
| UPC-A | Retail products sold in the US and Canada | 12 digits (11 + check digit) | Yes — for products sold in stores |
| EAN-8 | Small retail items with little label space | 8 digits (7 + check digit) | Yes — for products sold in stores |
| Code 39 | Industrial labels, ID cards, asset tags | Letters, numbers and - . $ / + % | No |
Code 128 is the flexible all-rounder: it handles letters, numbers and symbols, so it suits warehouse labels, asset tags, shipping and tickets. EAN-13 is the retail standard for most of the world, UPC-A is the retail standard for the United States and Canada, and EAN-8 is the same idea in a smaller code for tiny items. Code 39 is an older standard still common on industrial labels and ID cards.
Understanding check digits
Retail barcodes end in a check digit that catches typing mistakes. It is worked out from the other digits with weights of 3 and 1, alternating from the right: multiply the digits by 3, 1, 3, 1 and so on, add them up, and the check digit is what brings the total up to the next multiple of 10.
Worked example: 590123412345. From the right, the weighted sum is 5×3 + 4×1 + 3×3 + 2×1 + 1×3 + 4×1 + 3×3 + 2×1 + 1×3 + 0×1 + 9×3 + 5×1 = 83. The next multiple of 10 is 90, so the check digit is 7 and the full number is 5901234123457.
If you type a full 13-digit EAN-13, this tool checks the last digit for you and tells you if it is wrong, instead of drawing a barcode that will not scan. Remember: a correct check digit only means the number is well-formed. It does not mean the number is officially registered with GS1 — for products sold in stores, the number itself must come from GS1.
Printing tips
- Print at 100% scale — never use “fit to page”, which shrinks the bars and makes them unscannable.
- Keep the quiet zone clear: leave blank space on both sides of the bars, at least a few millimetres, with nothing printed over it.
- Print at least 3 cm wide, on a light background with strong contrast — dark bars on white works best.
- Test-scan one copy with your phone before printing hundreds.
- Use the SVG download for packaging and labels: as a vector image it stays sharp at any size, while a small PNG can go blurry when enlarged.
- Reprint if the bars are smudged, faded or creased — a damaged barcode is the most common reason a scanner fails.
Barcode won’t scan? Try this
- Check the size: a barcode printed too small is the most common failure. Print at least 3 cm wide and at 100% scale.
- Check the quiet zone: the clear space on both sides of the bars must be empty — a border or text too close will confuse the scanner.
- Check the contrast: dark bars on a light background. Grey bars on a coloured background often fail.
- Check the number: for EAN-13, UPC-A and EAN-8, a wrong check digit means the barcode will not scan. This tool validates the check digit before drawing.
- Try another scanner app: some older scanners only read certain formats, so test with a phone camera first.
- Check the format: a Code 128 barcode will not scan on a till that expects EAN-13. Pick the format your scanner or shop needs.
Frequently asked questions
What is a Code 128 barcode?
Will my barcode scan with a phone camera?
Can I use the generated barcodes commercially?
What is the difference between UPC, EAN and Code 128?
How do I create a barcode for free?
Can I generate many barcodes at once?
Which download format should I choose — SVG, PNG or PDF?
My barcode won't scan. What should I check?
Do I need a GS1 number for EAN-13 or UPC-A?
Related tools
QR Code Generator
UUID Generator
Random Number Generator
Password Generator
Privacy Policy Generator
Random Name Generator
💬 Comments
Have a question about this page, or an idea to make it better? Share it below — your feedback helps everyone who uses this site.