Free Barcode Generator Online

Create CODE128, EAN-13, and UPC-A barcodes — preview and download PNG in your browser, free

Free

Letters, numbers, symbols — general purpose

Bar width2px
Height80px

Click "Generate barcode" to preview

Choosing a symbology, and staying legal about it

A barcode generator encodes a value into a linear barcode symbology — a pattern of bars and spaces that follows a published standard — and renders it as an image a scanner can read.

Picking a barcode format is not a style choice. Each symbology accepts a different character set, enforces a different length, and is expected by different equipment. Send a CODE 128 barcode to a retail point-of-sale system expecting EAN-13 and it will scan perfectly and then be rejected by the till, because the number it decodes is not a product identifier the system knows.

This page explains what each supported format accepts, what the check digit does, and — the part most generators leave out — where retail barcode numbers legitimately come from.

The seven symbologies supported here

Direct answer: use CODE 128 for anything internal, and use the retail formats only with numbers that were properly issued to you.

FormatAcceptsTypically used for
CODE 128Letters, digits and symbols, variable lengthShipping labels, internal asset tags, warehouse bins — the sensible default for anything you control.
CODE 39Uppercase letters, digits and a few symbolsOlder industrial, automotive and defence systems. Produces wider codes than CODE 128 for the same data.
EAN-13Exactly 12 or 13 digitsRetail products outside North America. The 13th digit is a calculated check digit.
EAN-8Exactly 7 or 8 digitsSmall retail packaging where a full EAN-13 will not fit.
UPC-AExactly 11 or 12 digitsRetail products in the United States and Canada.
ITF-14An even number of digitsShipping cartons and outer cases, not individual retail units.
CodabarDigits and a small symbol setLibraries, blood banks and some logistics systems.

Enter a value the format cannot encode and the tool explains the mismatch in plain language rather than silently producing an unscannable image.

Check digits, quiet zones and other details that decide whether it scans

The check digit
EAN and UPC reserve the final digit for a checksum computed from the others. Supply 12 digits for EAN-13 and it is calculated for you; supply 13 and the last one must be correct or the barcode is invalid.
Quiet zones
Linear barcodes need clear margins on the left and right — roughly ten times the narrow bar width for EAN and UPC. Cropping tight to the bars is the most common cause of a code that will not scan.
Bar height matters
Scanners sweep across the bars, so squashing the height vertically to fit a layout makes alignment harder and scan rates fall. Keep the proportions the generator produces.
Print resolution
Thermal and laser label printers at 203 dpi or higher reproduce narrow bars reliably. Screenshots, inkjet on absorbent stock, and any upscaled low-resolution image will blur the bars together.
Contrast and colour
Black bars on white is the only combination that works universally. Red bars are effectively invisible to older red-laser scanners.
Output
A PNG rendered in your browser and downloaded directly — nothing is uploaded, and the values you encode stay on your device.

Direct answer: this tool draws a barcode for a number you supply. It cannot issue you a number, and generating an EAN-13 or UPC-A image does not give you the right to use that number on a product for sale.

Retail identifiers are allocated, not invented

GTINs used in EAN-13 and UPC-A barcodes are issued through GS1, the organisation that administers the global numbering system. Retailers and marketplaces verify that the prefix belongs to you.

Invented numbers collide

A made-up 12-digit number will scan, and it will very likely already belong to somebody else’s product. That surfaces as rejected listings, mispriced items at checkout and inventory that reconciles against the wrong SKU.

Resold or "one-off" barcodes are risky

Numbers sold cheaply by third parties are frequently reassigned from a defunct company’s prefix. Major marketplaces validate ownership against the GS1 registry and will delist products that fail.

Internal use is a different question entirely

For asset tags, shelf locations, work orders and internal stock control, use CODE 128 with your own numbering scheme. No registration is involved because the number never leaves your systems.

Mockups and testing are fine

Generating a sample barcode for packaging artwork, a scanner test, or a demonstration is a normal use of this tool. Swap in the issued number before production.

From spreadsheet to printed label

  1. 1

    Decide the symbology from the destination system

    Ask what the scanner or platform expects before choosing. Retail sale means EAN-13 or UPC-A; anything internal should be CODE 128.

  2. 2

    Validate the value

    Check the digit count against the format’s rule. The tool will tell you when the length is wrong, but catching it in your source data is faster.

  3. 3

    Generate and inspect

    Preview the code, confirm the human-readable digits underneath match your source value, and download the PNG.

  4. 4

    Place it with margins intact

    Keep the quiet zones and the bar height. Do not stretch the image to fill a box in your layout.

  5. 5

    Test with the real scanner

    Print at final size on the actual label stock and scan with the equipment that will be used. A code that scans on screen can fail on matte thermal paper.

Generating many codes from a product list? Convert the sheet with the CSV to JSON converter first so your values are clean and consistently keyed before you start.

How this page is maintained

The supported symbologies and their length rules were read from this tool’s validation code. Check-digit, quiet-zone and print-resolution guidance follows the published GS1 and symbology specifications; the section on number allocation reflects how GTINs are actually issued.

Written and reviewed by the ToolsRacks editorial team. Last reviewed: .

Works great with these tools

Need to encode a URL or long text instead of a product number? Use our free QR code generator for 2D codes that smartphones can scan.

Before embedding your barcode image on a web page, compress it for faster load times with our free image compressor.

Adding barcodes to labels or documents? Export the final document as a print-ready PDF using our free Word to PDF converter.

Barcode Generator: frequently asked questions

Answers to the questions people ask most often about this specific tool.

Which barcode format should I choose?

Choose the one the destination system expects. CODE 128 is the sensible default for anything internal such as asset tags and warehouse bins, while retail sale requires EAN-13 outside North America or UPC-A within it.

Can I invent my own retail barcode number?

No. Retail identifiers are allocated through GS1, and marketplaces validate that the prefix belongs to you. A made-up number will scan but is very likely already assigned to somebody else’s product.

What is the check digit?

EAN and UPC reserve the final digit for a checksum computed from the others. Supply 12 digits for EAN-13 and it is calculated for you; supply 13 and the last digit must already be correct.

Which formats does this tool support?

CODE 128, CODE 39, EAN-13, EAN-8, UPC-A, ITF-14 and Codabar. If a value cannot be encoded in the selected format, the tool explains the mismatch instead of producing an unscannable image.

Why will my printed barcode not scan?

Usually a missing quiet zone, a squashed bar height, insufficient print resolution, or coloured bars. Keep black bars on white, preserve the margins and proportions, and print at 203 dpi or higher.

Can I use these barcodes commercially?

You can use the images freely for internal systems, mockups and scanner testing. Products sold at retail must carry an identifier issued by the proper authority — this tool draws the barcode, it does not allocate the number.

Picked from Utilities and adjacent categories. Each one has its own page explaining how it works and where it falls short.

Looking for something else? Browse all 27 free tools →