This free barcode generator creates six common barcode formats in your browser. Set the bar width, height, text and colours, let the tool add the check digit, then download a PNG or SVG ready for labels and print.
- How to use the barcode generator
- Which barcode format to use
- Check digits explained
- Choosing your data
- Printing and size tips
- Common mistakes
- FAQ
- Related tools
How to use the barcode generator
- Pick a format: CODE128, EAN-13, EAN-8, UPC-A, CODE39 or ITF-14.
- Enter your data. For the retail formats, leave off the last digit, because the tool adds the check digit for you.
- Adjust the bar width and height, choose whether to show the text under the bars, and set the bar and background colours.
- Check the preview, which updates as you type. If the barcode does not look right, check that your data suits the format.
- Download the barcode as a PNG for documents and screens, or as an SVG for sharp printing at any size.
The barcode is drawn in your browser. Your data is not uploaded, and you do not need an account.
Which barcode format should you use?
| Format | What it holds | Typical use |
|---|---|---|
| CODE128 | Any text, digits and symbols | Internal labels, shipping, inventory |
| EAN-13 | 12 digits plus a check digit | Retail products outside North America |
| EAN-8 | 7 digits plus a check digit | Small retail packs |
| UPC-A | 11 digits plus a check digit | Retail products in North America |
| CODE39 | Capital letters, digits, a few symbols | Asset tags, industrial labels |
| ITF-14 | 13 digits plus a check digit | Cartons and cases |
These identify a product at the till. The numbers must be issued through GS1, the organization that manages them. A barcode image made from digits you invented is not a registered product code, and shops or marketplaces may reject it.
Use these for stock locations, order numbers, asset tags and file labels. You choose the data, so no registration is needed. CODE128 is compact and holds more characters.
The code for outer cases and pallets. It identifies a shipping unit, normally built from an item number plus a packaging digit.
Check digits explained
The last digit of EAN and UPC codes is a check digit. It is worked out from the other digits, so a scanner can catch most typing errors. The tool calculates it for you, which means you enter one digit fewer than the full code.
A quick example: enter 590123412345 as an EAN-13 and the tool adds 7, giving 5901234123457. For UPC-A, 11 digits such as 03600029145 become 036000291452. For EAN-8, the 7 digits 7351353 become 73513537. For ITF-14, 13 digits are entered and the tool adds the final one. As a worked case, starting with a packaging digit 1 and the first 12 digits of 5901234123457 gives 1590123412345, and the check digit 4 makes it 15901234123454.
If you already have a complete code, a wrong check digit tells you there is a typo somewhere. Re-enter the number from the source and compare.
Choosing your data
For internal labels, keep the data short and predictable. A code like WH-A12-04 is easier to scan and read than a long random string. Longer data means a longer, denser barcode, which needs more space and a cleaner print. CODE128 handles most characters. CODE39 accepts capital letters, digits and a few symbols only, so lower case letters need another format.
A good habit is to put the human-readable text under the bars. If a scanner fails, a person can type the number in. Switch the text option on unless the space is very tight.
Keep leading zeros. A UPC-A code often starts with a zero, and an ID such as 0042 is a different value from 42. Type the data exactly as it should be read, and avoid pasting from a spreadsheet that may strip zeros or turn long numbers into scientific notation.
Printing and size tips
Most scan failures come from printing, not from the barcode itself. These tips avoid the usual problems.
Use dark bars on a light background. Black on white is safest. Avoid red bars, light colours and low contrast, because many scanners cannot see them. Do not invert the colours. Leave a clear white margin on both sides of the code, since scanners need that space to find where the bars begin.
Print at 100 percent scale. Turn off fit to page in your print dialog, as scaling changes the bar widths. Do not stretch the image to fit a label. If you need a bigger code, raise the bar width and height in the tool and download again. For large or professional prints, use the SVG because it stays sharp at any size.
A thermal label printer needs a bar width that suits its resolution, so print a test sheet. Scan it with the phone or scanner you will really use, from the normal distance, before you print a big batch.
Common mistakes
The most common mistake is using a retail format for internal stock. It works on a scanner but looks like a product code, and it can clash with real products if the number is ever read by a till. Use CODE128 for internal use instead. The second mistake is shrinking the image so far that the bars blur. If the preview looks crowded, shorten the data or switch format.
Frequently asked questions
Which barcode format should I use?
Use CODE128 for internal labels, shipping and inventory. Use EAN-13 or UPC-A for retail products, with numbers issued through GS1. Use EAN-8 for small packs, CODE39 for simple asset tags and ITF-14 for cartons and cases. Pick the one your scanner and buyer expect.
Can I use this to make barcodes for products I sell in shops?
The tool draws a correct EAN or UPC image, but retail numbers must come from GS1. A barcode made from random digits is not a registered product code. Many retailers and marketplaces expect GS1 numbers, so get yours before you print packaging.
What is the check digit and do I enter it?
The check digit is the last digit of EAN, UPC and ITF-14 codes, calculated from the others to catch typing errors. You do not enter it. Type the digits before it and the tool adds it, so a 13-digit EAN-13 needs only 12 digits from you.
Should I download PNG or SVG?
Choose PNG for web pages, documents and quick screen use. Choose SVG when you print, because it is made of vector shapes and stays sharp at any size. If a printer or designer asks for a vector file, send the SVG.
Why will my barcode not scan?
The usual causes are low contrast, bars that are too thin, scaled printing, missing white margins or a colour such as red. Print at 100 percent, use black on white, increase the bar width and test with the scanner you will use.
Is my data sent anywhere?
No. The barcode is generated in your browser, so the numbers and text you enter stay on your device. Nothing is uploaded or stored. You can download the PNG or SVG straight to your computer. The tool does not ask for an account or any personal details.
Related free tools
Need help with a website as well as a quick tool? Get in touch with Rank Ray and tell us what you are working on.
