Barcode Generator

Type a number or text, pick the barcode type and download it as a PNG or an SVG. Check digits are calculated or verified for you, and the page tells you when a setting is likely to make the barcode hard to scan.

Free, no sign-up. Drawn in your browser: nothing is uploaded.

Barcode details

EAN-13, UPC-A and EAN-8 take digits only: enter all but the last digit and it is added, or enter the full number and it is checked.

Code 128 takes standard ASCII (no accents or emoji). Spaces and dashes in EAN and UPC numbers are ignored.

A module is the thinnest bar. 1 to 10.

20 to 500.

Blank space each side. EAN and UPC need at least 7 for their numbers.

Enter a value and your barcode appears here.

How to

Make a barcode in three steps

  1. Choose the type and enter the value

    Code 128 holds ASCII text such as order or SKU codes. EAN-13, UPC-A and EAN-8 hold digits only, and the last digit is a check digit.

  2. Set size and colours

    Pick how many pixels each module should be and how tall the bars are. Black bars on white are the most dependable choice for a clean scan, and the page warns you if the colours or the quiet zone are a problem.

  3. Download and test

    Save the PNG for screens or the SVG for print, then scan it with the scanner or app you will use in real life.

Getting a barcode that scans

  • Keep dark bars on a light background and leave the blank margins on both sides. A tight crop is the most common reason a barcode fails.
  • Use the SVG for labels and print. If you use the PNG, make each module at least 2 pixels wide and do not stretch the picture afterwards.
  • Enter EAN and UPC numbers without the last digit and let the tool add it, so the check digit cannot be wrong.
  • Code 128 is a good choice for internal codes such as orders, shelves and assets, because it holds letters, digits and punctuation in a short symbol.
  • Test with the scanner you will actually use. Handheld scanners, phone cameras and warehouse readers differ in how forgiving they are.

FAQ

Barcode questions

Which barcode type should I use?

Use EAN-13 or UPC-A when you have a product number you are allowed to use in retail (EAN-13 is common outside North America, UPC-A inside it). Use EAN-8 for very small packages that have an 8-digit number. Use Code 128 for your own internal labels, because it holds letters and punctuation as well as digits.

What is the check digit and why is it added?

The last digit of an EAN or UPC number is calculated from the others, so a scanner can tell when it has misread a digit. If you enter one digit fewer than the full length it is added for you; if you enter the full number the tool checks it and tells you the correct digit when it is wrong. Code 128 has a check symbol too, which is added automatically and is not printed as text.

Can I use these barcodes on products sold in shops?

Only with a number you are entitled to use. Retail numbers are issued through GS1 and carry your company prefix. This tool draws the bars for whatever valid number you type; it cannot give you one and it does not check that a number is registered.

Is my data uploaded anywhere?

No. The barcode is built by JavaScript in your browser and the page makes no network request with your value.

Why does the PNG sometimes have no printed text?

The PNG uses a small built-in digit font so that it can be made without any outside code. It prints the number for EAN, UPC and all-digit Code 128 values. Other Code 128 text appears in the SVG, which uses your device’s font, and in the page above the download buttons.

What size should I print it at?

That depends on your scanner and on any retail specification you must follow, so check those requirements first. As a general rule, make the thinnest bar at least two pixels wide in a PNG, do not stretch the image, keep the blank margins and prefer the SVG for print.