Choose language

Barcode Generator

Create 1D barcodes in nine symbologies including EAN-13, UPC-A and Code 128. Set scale, bar height and human-readable text, then download as PNG or SVG.

Mehmet Demiray Published Updated
Share
EAN, UPC, ITF and ISBN expect a fixed number of digits; Code 128 and Code 39 accept free text.
The value to encode in the barcode.
Module width multiplier — larger values produce a wider barcode.
Height of the bars (in millimeters).
Print the encoded value as readable text under the barcode.

Choosing a Symbology

A symbology is the encoding scheme a barcode uses, and picking the right one starts with where the code will be scanned. For retail products sold at a checkout, use the format your region expects. EAN-13 is the global standard for consumer goods, while UPC-A is used in North American stores. Both are tied to the registered product number printed on packaging.

Logistics has its own needs. ITF-14 encodes the shipping container code on cartons and pallets, where the printing surface is rough and the code is scanned in motion. Its wide bars survive that environment better than a dense retail symbol would.

For everything else, Code 128 is the general workhorse. It packs both numbers and letters into a compact code, which makes it ideal for internal inventory tags, asset labels and tracking numbers. This tool supports nine symbologies in total, so you can pick the EAN-13, UPC-A or Code 128 generator when you know exactly which format you need.

Data Rules Per Type

Each symbology has strict rules about what data it accepts, and the tool checks your input against them. Numeric retail formats expect a fixed digit count. EAN-13 takes 12 digits and adds a thirteenth check digit automatically. EAN-8 takes 7, UPC-A takes 11, and ITF-14 takes 13, each with a check digit appended for you.

The check digit is a single calculated number that lets a scanner detect a misread. You never type it yourself. Enter only the base digits and the generator computes and appends the correct one, which is why your input may show one extra digit in the result.

Text-capable formats are more flexible. Code 128 accepts the full set of letters, numbers and symbols, while Code 39 covers uppercase letters, digits and a handful of characters. Codabar is limited to digits and a few symbols used in libraries and labs. When data does not fit the chosen type, the tool reports the problem clearly instead of producing an invalid code.

Sizing for Scanners

A barcode scans reliably only when its proportions stay within the limits a reader expects. The narrowest bar, called the module or X-dimension, sets the overall density. If you shrink it too far, the printer cannot reproduce the thin bars cleanly and scanners start to miss reads. Increase the scale rather than forcing a tiny code onto a small label.

Bar height matters because handheld scanners are often held at a slight angle. Taller bars give the beam more room to cross the full pattern, so keep the height generous unless space is genuinely tight. Very short bars work only with fixed, well-aligned scanners.

Quiet zones are the blank margins on the left and right of the code. They tell the scanner where the pattern begins and ends. Leaving them out is one of the most common reasons a freshly printed barcode fails. Keep clear space on both sides, and enable the human-readable text so staff can key the number in if a scan ever fails.

Printing Tips

How a barcode is printed often matters more than how it was generated. Resolution comes first. Aim for a crisp print at 300 dots per inch or higher so the narrow bars hold their exact width. A blurry or low-resolution print smears the bars together and ruins the read.

Contrast is the next priority. Scanners read the difference between dark bars and a light background, so black bars on white give the best result. Avoid colored bars, shiny laminates and reflective backgrounds, which scatter the scanner light and lower the contrast the reader sees.

Material and placement round it out. On glossy or curved surfaces, glare can hide bars, so position the code on a flat area and test under the lighting where it will actually be scanned. Download SVG when the label may be resized later, since it stays sharp at any dimension, and keep a PNG for quick digital use. Always scan a printed sample before committing to a production run.

Barcodes Compared to QR Codes

Barcodes and QR codes solve different problems. A 1D barcode stores a short identifier, usually a product or tracking number, in a single row of bars. It is fast to scan with a laser reader and is the backbone of retail checkouts, warehouses and shipping, where a database holds the real details behind the number.

A QR code is a 2D matrix that stores far more data and is built for phone cameras rather than dedicated scanners. It suits consumer-facing uses such as linking a poster to a webpage or sharing contact details, which is a different tool entirely.

This page focuses on 1D barcodes across nine symbologies. Choose it when you need a scannable identifier for products, inventory or logistics. When you receive printed barcodes from suppliers and need to read them back into plain data, the Barcode Reader decodes them for you. Matching the code type to the job keeps your labels working with the scanners that will read them.

The ones we answer the most.

Which barcode type should I use for retail products?

Use the format your sales region expects. EAN-13 is the worldwide standard for consumer goods, and UPC-A is common in North American retail. Both encode a registered product number that you obtain when you list the item, so the barcode must match that assigned number rather than an arbitrary value. If the product is sold internationally, EAN-13 is the safer default. For internal stock that never passes a public checkout, Code 128 is more flexible.

How do I generate a barcode from free text?

Choose Code 128, which accepts letters, numbers and symbols, then type your value into the data field. Code 39 is another option if you only need uppercase letters and digits. The numeric retail formats like EAN-13 and UPC-A will not accept text, so the tool will flag the input if you try. For asset tags, internal references or tracking strings, Code 128 gives you the most room.

What scale should I use for small labels?

Raise the scale until the narrowest bar prints cleanly rather than shrinking the code to fit. The thin bars set the readable limit, so a denser code needs a higher-resolution printer. Keep the bar height generous, leave the quiet-zone margins on both sides, and print a test label. If the sample scans on the first pass from a normal distance, the scale is right for your printer and scanner combination.

Why is my 12-digit EAN input shown with 13 digits?

EAN-13 carries a check digit, a single calculated number that lets the scanner catch a misread. You enter only the 12 base digits and the tool computes and appends the thirteenth automatically. That is why the result shows one more digit than you typed. The same applies to other numeric formats, each of which adds its own check digit, so always enter the base number without trying to include the check digit yourself.

Does the tool create the product number for me?

No. For retail formats like EAN-13 and UPC-A, the number itself must come from the registration authority that assigns product codes to your business. The generator turns that assigned number into a scannable barcode and adds the check digit, but it cannot invent a valid registered identifier. For internal use with Code 128 or Code 39, you are free to use any value your own system defines.

What happens if I enter invalid data for the chosen format?

The tool checks your input against the rules of the selected symbology and reports the problem clearly instead of producing a broken code. Common issues include the wrong digit count for a numeric format or characters that the chosen type does not support. Correct the data based on the message, or switch to a more flexible format like Code 128 if your value mixes letters and numbers.