Barcode generator

Type a product number or a label text and download the barcode as a PNG or an SVG. For EAN, UPC and ITF-14 the check digit is worked out for you.

  • Check digit added for you
  • Made in your browser
Type of barcode
12 digits and the check digit is added, or all 13.

Numbers for products in shops come from GS1. This tool draws the code for the number you type.

PNG 452 × 144 px

Settings Colours, bars 4 px wide, 80 px high
Colours
Hex code, such as #000000
Hex code, such as #000000
Bar width
Bar width
The thinnest bar in the PNG. Wider bars, larger file.
Bar height
Bar height

Pick the type, type the number or text, and the barcode is drawn as you type. Download it as a PNG for documents and label software, or as an SVG that scales for print without losing sharpness.

How to make a barcode

  1. Pick the type.

    EAN-13 is selected. The row also has EAN-8, UPC-A, UPC-E, Code 128, Code 39 and ITF-14. On a phone it is one row that scrolls sideways.

  2. Type the number or text.

    The field opens with an example, so a code is on screen before you type. For EAN, UPC and ITF-14 it is called Number and phones show the number keyboard; for Code 128 and Code 39 it is Text. The hint under it says how many digits or which characters the type takes.

  3. Change the look if you need to.

    Settings at the bottom of the card holds the bar colour and background, Bar width (2, 4 or 8 px), Bar height and Digits under the bars. These are remembered in this browser; the number you typed is not.

  4. Download it.

    Download PNG saves the image at the size shown under the buttons, 452 × 144 px for an EAN-13 with the defaults. SVG saves a vector file. On a phone, Share sends the PNG to Photos or a chat; on a computer, Copy puts it on the clipboard where the browser allows it.

Which barcode type do I need?

Use EAN-13 for products sold in shops outside the US and Canada, UPC-A for products sold there, and Code 128 for anything you label yourself: parcels, shelves, stock and serial numbers.

Type Holds Typical use
EAN-13 13 digits, the last one a check digit Retail products in Europe and most countries
EAN-8 8 digits Small packs with no room for an EAN-13
UPC-A 12 digits Retail products in the US and Canada
UPC-E 8 digits, a shortened UPC-A Small packs in the US and Canada
Code 128 Unaccented letters, digits, signs; up to 48 Shipping, inventory, asset tags, any text
Code 39 Capitals, digits, space, - . $ / + %; up to 48 Older industrial systems, ID badges
ITF-14 14 digits Outer cartons and cases of a product

A UPC-E is typed as its own 6, 7 or 8 digits, starting with 0 or 1, not as the 12-digit UPC-A it stands for. Code 39 has no check character here: if your system expects the optional mod 43 digit, add it to the text yourself. For a code that phones open as a link or a Wi-Fi login you need a 2D code, which the QR code generator makes.

How the check digit works

The last digit of an EAN, UPC or ITF-14 is a check digit. A scanner recalculates it from the other digits and rejects the scan when they do not match, which catches a misprinted or misread number.

Type the number without it and the page adds it: 12 digits for an EAN-13, 11 for a UPC-A, 7 for an EAN-8, 13 for an ITF-14. A line under the field says which digit was added, for example Check digit 7 added. Type the full number and the page checks it. A wrong last digit gives a message such as “The check digit should be 7, not 8”, the preview keeps the last good code dimmed, and the download buttons are disabled until you fix it.

The rule is GS1’s mod 10. Take the digits from the right, multiply them by 3 and 1 in turn, add them up, and the check digit is what brings the sum to the next multiple of 10. For 590123412345 the sum is 83, so the check digit is 7 and the full EAN-13 is 5901234123457. Code 128 has its own check character inside the bars, which scanners read and do not show.

Where to get an EAN or UPC number

Numbers for products sold in shops come from GS1, through the GS1 office in your country. The company gets a prefix and numbers its own products from it, and retailers look the number up in their systems. This page draws the barcode for whatever number you type; it does not issue numbers or register them anywhere.

Before you print a retail barcode, check the number in your GS1 account. A made-up EAN-13 can pass the check digit and still belong to another company’s product. For your own stock, bins and documents you do not need GS1: a Code 128 with your own SKU or order number is enough.

What size to print a barcode

Print the barcode at the size the standard sets for its use. For an EAN-13 on a product, the GS1 General Specifications put the 100% size at 0.33 mm per module (the thinnest bar), 37.29 mm wide with the margins, and allow 80% to 200% of that for products scanned at the till.

The PNG has pixels, not millimetres, so the printed size depends on the resolution it is placed at. At 300 dpi the default 4 px bar is 0.34 mm, and the 452 px EAN-13 prints about 38.3 mm wide, close to 100%. The 2 px bar at 300 dpi is about 51%, too small for retail; use it for screens. In the SVG, set the width in your layout program to the size you need.

The same settings give each type a different width. These are the PNGs from this page at the default 4 px bar, with the example text the page has for each type:

UPC-E 268 px

EAN-8 324 px

EAN-13, UPC-A 452 px

Code 128, SKU-10482 572 px

ITF-14 620 px

Code 39, PART-0042 780 px

SKU-10482 and PART-0042 both have 9 characters, but the Code 39 version is 36% wider. For a long text on a small label, Code 128 fits more in the same space.

The white margin left and right of the bars is the quiet zone. Scanners need it to find where the code starts, so the page always draws it and you cannot turn it off: 11 modules on the left of an EAN-13 and 7 on the right, 9 on each side of a UPC-A, 10 for Code 128, Code 39 and ITF-14. Leave it white when you crop the image or place it on a label.

PNG or SVG for labels and print

Download the SVG for anything printed by a print shop or laid out in Illustrator, InDesign or Affinity, and the PNG for documents, web pages and label software that takes pictures.

The PNG draws each module as a whole number of pixels (2, 4 or 8), so the bar edges stay sharp with no grey pixels in between. It stays sharp as long as nothing resizes it by an odd factor; a printer driver that stretches it can make bars of the same width print unevenly. The SVG is about 1 KB and has no pixels to stretch.

The digits are set in the system’s monospace font, not the OCR-B font of printed retail codes. In the SVG they are text, so the program that opens it picks the font. Scanners read the bars, not the digits.

Colours and contrast

Black bars on a white background scan best. Scanners measure the difference between dark bars and light spaces, so dark blue, green or brown bars on white or a pale tint also work. Settings has five bar colours and five backgrounds plus a field for any hex colour.

When the colours are too close, the page warns “Low contrast: some scanners may not read this barcode”. Light bars on a dark background get a separate warning, because many scanners cannot read an inverted code. Avoid red bars: many laser scanners use red light, and red bars then look as pale as the background.

A barcode that does not scan, and other problems

The scanner does not read the printed barcode

Check the quiet zone first: text, a frame or the edge of the label must not touch the bars. Then print it larger or at a higher resolution, and check that the printer did not smear the bars together.

The till reads a different product

The number belongs to someone else in the shop’s system. Check the number in your GS1 account and make the barcode again with the right one.

It says the check digit should be another number

The last digit you typed does not match the others. Fix it, or delete it and the page adds the right one.

It says a character cannot be used

Code 39 and Code 128 do not hold accented letters such as é or ü, and Code 39 also refuses signs such as _ and #. Replace them, or switch Code 39 to Code 128.

The shipping label needs a GS1-128 barcode

GS1-128 is a Code 128 with special data identifiers, such as (01) for the product and (17) for the expiry date. This page draws plain Code 128 without them, so ask your carrier or use label software that supports GS1-128.

The carton printer asks for bearer bars

ITF-14 printed straight on corrugated board often has a thick frame around it. This page draws the ITF-14 without it; add the frame in your layout program or print the barcode on a label.

Limits and privacy

Types
EAN-13, EAN-8, UPC-A, UPC-E, Code 128, Code 39, ITF-14
Text
Up to 48 characters for Code 128 and Code 39
Files
PNG with bars 2, 4 or 8 px wide; SVG at about 1 KB. No PDF or EPS
Checked

PNGs of every type except UPC-E decode in the ZXing reader; UPC-E is checked against the standard’s tables

Privacy

The barcode is drawn on your device; the number is not sent anywhere

Next step sends the PNG to JPG to PDF for a printable page, or to Resize image and Compress image, without downloading it first.

Questions about Barcode generator

What is the difference between EAN-13 and UPC-A?

A UPC-A holds 12 digits and an EAN-13 holds 13. A UPC-A number is an EAN-13 with a 0 in front, and the bars in the middle are the same, so till scanners set up for retail read both. The UPC-A prints its first and last digit outside the bars.

Can a barcode hold letters?

Code 128 and Code 39 can. Code 128 takes letters without accents, digits and the signs on a keyboard; Code 39 takes capitals, digits, the space and - . $ / + %. EAN, UPC and ITF-14 hold digits only. This page fits up to 48 characters in one barcode.

Can I make many barcodes at once?

Not on this page. It draws one barcode at a time. Type the next number and download again; the type, colours and sizes stay as you set them.

How do I put a barcode in Word or Excel?

Download the PNG and insert it as a picture, the same way as a photo. Recent versions of Microsoft Office also insert SVG files, which stay sharp when you resize them on the page. Keep the white margin around the bars when you crop.

Why does a UPC-A have digits outside the bars?

The first digit is the number system and the last is the check digit. The standard prints them smaller, beside the bars, and the guard bars run longer between the digit groups. The digits help a person type the number in by hand when a scan fails.

Is the number in an ITF-14 the same as on the product?

Close. GS1 builds the 14 digits from an indicator digit for the packing level, then the first 12 digits of the product number, then a new check digit. Type the first 13 and the page adds the check digit.

Updated November 30, 2026