Free barcode generator for EAN, UPC, Code 128 and more
Draw a print-ready barcode, check the digit and download it as PNG or SVG in your browser.
#000000#ffffff- Encoded value
- Check digit
- Length
How to create a barcode
Choose the format that matches where the product or label will be scanned, enter the value and download the result. The tool validates as you type.
- Select the barcode format Pick EAN-13, EAN-8, UPC-A, Code 128, Code 39 or ITF-14. A rule below the field explains what that format accepts.
- Enter the value Type the digits or text. For EAN, UPC and ITF-14 you can leave out the check digit and it is added for you.
- Read the check digit The readout shows the check digit as calculated or verified, so you can confirm that a number you already have is valid.
- Adjust the bars Set the bar width from 1 to 4 pixels and the height from 30 to 250 pixels to fit your label.
- Choose colours and text Keep dark bars on a light background, and decide whether the number is printed under the bars.
- Download PNG or SVG Use SVG for print because it stays sharp at any size. PNG is fine for screens and documents.
- Test the printed result Scan a printed sample with the scanner or app that will be used in practice.
Tips for barcodes that scan reliably
- Keep plenty of blank space to the left and right of the bars, since scanners need that margin.
- Print at the size recommended for your format and avoid shrinking below it to squeeze a label.
- Use black bars on white, because red and light colours often fail under laser scanners.
- Print on a matte surface where you can, as glare from glossy film can blind a scanner.
- Do not stretch the image in only one direction, because bar ratios must stay exact.
Common barcode mistakes
- Making up retail numbers A number that looks valid is not registered to you. Retail products need genuine numbers from the proper issuer.
- Wrong length EAN-13 needs 12 or 13 digits and UPC-A needs 11 or 12. The tool tells you when the count is wrong.
- Typing the check digit wrongly A single wrong digit makes the check fail. Enter the number without it and let the tool calculate.
- Using the wrong format Code 39 cannot hold lower case letters natively, and EAN formats cannot hold letters at all.
Open it pre-filled with a link
Every field accepts a query parameter with the same name, so a link, a script or an AI agent can fill the tool in and run it. Open an example: /tools/barcode-generator/?format=ean13&data=590123412345
| Parameter | Values | What it does |
|---|---|---|
format | ean13 · ean8 · upca · code128 · code39 · itf14 (default: ean13) | Barcode format: ean13, ean8, upca, code128, code39 or itf14. |
data | text | The value to encode. For EAN-13, EAN-8, UPC-A and ITF-14 you may leave out the check digit; it is added and shown. |
width | number (default: 2) | Bar width in pixels, 1 to 4. |
height | number (default: 100) | Bar height in pixels, 30 to 250. |
text | 1 or 0 (default: 1) | 1 to print the value under the bars, 0 to hide it. |
fg | #rrggbb (default: #000000) | Bar colour as #rrggbb (write the # as %23 in a URL). |
bg | #rrggbb (default: #ffffff) | Background colour as #rrggbb (write the # as %23 in a URL). |
What this barcode generator includes
It focuses on the formats that stores, warehouses and shipping teams use every day, with checks that catch mistakes early.
- Six formats EAN-13, EAN-8, UPC-A, Code 128, Code 39 and ITF-14 cover retail, labels and cartons.
- Automatic check digit Enter one digit fewer and the check digit is calculated, or enter the full number and it is verified.
- Clear validation messages You see exactly what is wrong, such as a wrong length, a non-digit or a mismatched check digit.
- Adjustable bars Control bar width and height so the code fits shelf labels, tags or carton stickers.
- Colour options Change bar and background colours, while keeping strong contrast for scanners.
- Optional human-readable text Show or hide the number under the bars as your layout requires.
- PNG and SVG download Export a raster image for screens or a vector file for professional print.
- Technical readout The encoded value, check digit and length are shown beside the preview.
Barcode formats compared
| Format | Data and length | Typical use |
|---|---|---|
| EAN-13 | 13 digits including check digit | Retail products worldwide |
| EAN-8 | 8 digits including check digit | Very small packs |
| UPC-A | 12 digits including check digit | Retail, mainly North America |
| Code 128 | Any printable ASCII characters | Alphanumeric labels and logistics |
| Code 39 | A to Z, 0 to 9 and a few symbols | Simple internal labels |
| ITF-14 | 14 digits including check digit | Outer cartons and cases |
When you need a barcode
Barcodes turn a short value into something a scanner reads in a fraction of a second. Common uses include the following.
Product labels
Add a scannable number to shelf labels, price tags and product packaging. Scanning replaces hand-typing, which removes a common source of mistakes.
Warehouse and stock
Label bins, shelves and pallets with Code 128 so stock counts go faster. A scanned label is also easier to check against a pick list.
Asset and equipment tags
Tag laptops, tools and furniture with a unique internal code. Internal numbers avoid any clash because they never leave your own premises.
Shipping cartons
Print ITF-14 on outer cartons so a case can be scanned at goods receipt. This avoids opening every carton to identify the contents.
Tickets, vouchers and loyalty cards
Encode an order or voucher number that a till can read quickly.
Library, archive and document tracking
Number files or books with Code 39 or Code 128 labels.
Always confirm the format and numbering requirements of whoever will scan the code before you print.
Frequently asked questions
Is my data uploaded anywhere?
No. Each barcode is drawn in your browser, so the values you type stay on your device. Nothing is sent to or stored on a server, and the page does not need an account or any personal details.
Does this tool issue official GTIN numbers?
No. It draws the barcode but does not issue registered numbers. Official GTINs are licensed through the GS1 member organisation in your country, and retailers usually expect numbers that belong to your company.
What is the check digit and how is it calculated?
The last digit of EAN, UPC and ITF-14 numbers guards against typing errors. The other digits are weighted 3 and 1 alternately starting from the right, summed, and the check digit tops the sum up to a multiple of ten.
Which barcode format should I choose?
Use EAN-13 for retail products sold worldwide and UPC-A for North American retail. Choose Code 128 for alphanumeric labels and logistics, Code 39 for simple labels, EAN-8 for tiny packs and ITF-14 for outer cartons.
Can I use letters in a barcode?
Yes, in Code 128 and Code 39. Code 128 accepts printable ASCII characters, while Code 39 accepts capital letters, digits, space and a few symbols. EAN, UPC and ITF-14 take digits only.
How large should I print the barcode?
Larger is safer. Keep the generous blank margins either side, print at the recommended size for the format and test a printed sample with your own scanner before running a full batch.
Have a project in mind? Let us talk it through.
Tell us what you want to build or improve. We reply with a clear next step.