Skip to content
SimpleConvertSimpleConvert

Barcode Generator

Create Code 128, Code 39, EAN-13, EAN-8, UPC-A and ITF barcodes with automatic check digits, adjustable bar width and height, and PNG or SVG export.

How to use it

  • Pick the barcode type — Code 128 handles any text and is the safe default.
  • Type the value. Check digits for EAN and UPC are worked out and added for you.
  • Adjust bar width and height if the code needs to fit a particular label.
  • Export SVG for print, or PNG for screens.

Examples

Code 128, “TOOLHUB-2026”Scannable barcode with the text underneath
EAN-13, 590123412345Adds check digit 7 automatically

A barcode is a row of bars and spaces of varying width that encodes a number or a short piece of text. Unlike a QR code it holds far less data, but it is read instantly by every till scanner and warehouse gun in existence, which is exactly why it has not been replaced.

Everything here is generated in your browser as vector graphics, with the check digits calculated according to each symbology's own rules.

Which barcode type do you need?

TypeAcceptsWhere it is used
Code 128Any printable text and numbersShipping labels, logistics, internal asset tags
Code 39A–Z, 0–9, space, - . $ / + %Industry, defence, older inventory systems
EAN-1312 digitsRetail products almost everywhere outside North America
EAN-87 digitsRetail items too small for a full EAN-13
UPC-A11 digitsRetail in the United States and Canada
ITF / ITF-14Digits in pairsOuter shipping cartons and cases

Code 128 — the general-purpose choice

If you are labelling your own stock and nothing has to satisfy a retailer's rules, use Code 128. It takes letters, numbers and punctuation, and it is compact: runs of digits are automatically packed two to a symbol, so a long numeric code comes out around half the width it otherwise would.

It is the default for shipping labels and warehouse systems for exactly those reasons.

EAN-13, EAN-8 and UPC-A — retail barcodes

These are the barcodes on products in shops, and they are the ones with rules. The number is not arbitrary: the leading digits identify the company, and they are allocated by GS1, the organisation that runs the system. You cannot invent a number and expect a retailer to accept it.

You can generate them here for testing, for internal use, or once you already hold a legitimate GS1 number. The final digit is a check digit calculated from the rest — type the first 12 digits of an EAN-13 and the thirteenth is worked out and shown before it is encoded.

How the check digit works

Take the digits from the right, multiply alternate ones by 3 and the rest by 1, add them all up, and the check digit is whatever brings the total to the next multiple of ten. A single mistyped digit almost always breaks that sum, which is how a scanner knows to reject a bad read rather than charge for the wrong item.

Printing barcodes that actually scan

  • Black bars on a white background. Coloured bars and inverted codes defeat many laser scanners, which read red light.
  • Leave the quiet zone. The blank margin either side is part of the symbol, not decoration.
  • Do not stretch the barcode horizontally. Scaling the width changes the bar ratios, which is what the scanner is measuring.
  • Height is safe to change — taller bars simply give the scanner more chances to catch a clean read across the code.
  • Print at 300 dpi or better, and check that the ink is not spreading and closing up the thin spaces.
  • Export SVG rather than PNG for anything printed, so nothing is resampled.

Barcode or QR code?

Use a barcode when a number has to be read by existing scanning hardware — a till, a warehouse gun, a library system. Use a QR code when a phone is doing the scanning and you want to carry more than a number, such as a link or contact details.

They are not competitors so much as different tools. Plenty of packaging carries both: an EAN-13 for the till and a QR code for the customer.

Questions people ask

Can I make my own EAN-13 number for a product?

Not for retail sale. EAN and UPC numbers are allocated by GS1, and retailers verify them. You can use any number for internal purposes or testing, but a shop will reject an unregistered one.

Why does my barcode not scan?

Most often the quiet zone was trimmed off, the code was stretched horizontally, or it was printed too small. Print it larger with clear white margins and try again.

What is the difference between Code 39 and Code 128?

Code 39 is older, accepts a limited character set and produces wider codes. Code 128 handles the full printable ASCII range and is considerably more compact. Choose Code 128 unless a system specifically requires Code 39.

Can barcodes hold letters?

Code 128 and Code 39 can. EAN, UPC and ITF are numeric only — that is fixed by the symbology, not a limitation of this tool.

Is my data uploaded anywhere?

No. The code is generated in your browser from the text you type, and a logo you add is read locally into the image. Nothing reaches a server, so there is nothing to log, track or leak.

Runs entirely in your browser. Nothing you type is uploaded, logged or shared.

Last updated 22 August 2026