Toolminex
Developer Tools

Barcode Generator

Generate barcodes in Code 128, EAN-13, EAN-8, UPC-A, Code 39, and ITF formats. Download as PNG or SVG, no uploads, no account needed.

Runs in browserFree & no signupPNG & SVG download

Settings

15 / 80 chars, Any text or numbers

Preview

How to create a barcode

Choose a format, enter the data, and download a PNG. Check digits are added for you.

  1. 01

    Pick the format your scanner or retailer expects

    Code 128 for general labels, EAN-13 or UPC-A for retail products, EAN-8 for small packs, Code 39 for older industrial systems, and ITF for cartons. The table below helps you choose.

  2. 02

    Enter the data

    For EAN-13, EAN-8 and UPC-A, type the digits without the check digit (12, 7 or 11 digits) and the tool calculates it. ITF needs an even number of digits; for ITF-14 enter all 14, including its check digit.

  3. 03

    Download and test-scan before printing

    Save the PNG, print one label at the size you'll use, and scan it with your actual scanner or a phone app before printing hundreds.

Which barcode format to use

Each format encodes a different set of characters and is expected in different places. Using the wrong one is the most common reason a barcode won't scan in a shop or warehouse system.

FormatWhat it encodesLengthTypical use
Code 128Any keyboard characterUp to 80Shipping labels, asset tags, internal stock
EAN-1312 digits + check digit13Retail products worldwide, including India and Europe
UPC-A11 digits + check digit12Retail products in the US and Canada
EAN-87 digits + check digit8Small packs where EAN-13 won't fit
Code 39A–Z, 0–9, space, - . $ / + %Up to 43Older industrial, defence and healthcare systems
ITF (Interleaved 2 of 5)Even number of digitsUp to 14Outer cartons (ITF-14) and warehouses

For goods sold through retailers, the number itself matters as much as the format. EAN-13 and UPC-A numbers must come from GS1, the organisation that issues company prefixes (GS1 India for Indian businesses). A barcode with a made-up number will scan, but it won't match any product in a retailer's system.

How the check digit is calculated

EAN and UPC codes end with a check digit so scanners can catch misreads. Starting from the rightmost data digit, multiply digits alternately by 3 and 1, add them up, and the check digit is whatever brings the total up to the next multiple of 10. For the EAN-13 number 590123412345, the weighted sum is 83, so the check digit is 7 and the full code is 5901234123457.

The same rule gives 4 for the EAN-8 data 9638507 and 2 for the UPC-A data 03600029145. We checked each format's output against python-barcode, an independent open-source library, and the bars match exactly.

What barcodes are used for

Labels for stock and assets

Code 128 encodes item IDs with letters and numbers, so laptops, tools and shelves can be tracked with any scanner.

A product's retail barcode

Enter the 12 digits from your GS1 allocation to get an EAN-13 with its check digit, ready for packaging artwork.

Testing a scanning setup

Generate test codes in each format to check which ones your scanner or point-of-sale system is configured to read.

Getting a barcode that scans reliably

  • Leave white space either side. Scanners need a clear quiet zone; don't place text, borders or other artwork right up against the bars.
  • Don't shrink it too far. EAN-13 is designed to be about 37 mm wide at standard size; much smaller and cheap scanners struggle.
  • Print in black on white. Low-contrast colour pairs, such as red bars or bars on a dark background, often fail to scan.
  • The PNG is a fixed-resolution image. For large print runs, keep the bars sharp by not stretching the image; scale it in whole multiples if you can.

Frequently asked questions

No. The barcode is drawn on a canvas in your browser.
You can create the image, but retailers and marketplaces generally require GS1-issued numbers so the code is unique worldwide.
A barcode stores a short line of data in one dimension, read across. A QR code is two-dimensional and can hold a whole URL or paragraph. Use the QR Code Generator for links.
Standard Code 39 has no lower-case characters. Lower-case input is converted to capitals before encoding.

Related tools

Something not working right?