Barcode Generator

Create Code 128, EAN-13, EAN-8, UPC-A, Code 39, and ITF-14 barcodes. Check digits are calculated or verified for you, and you can download the barcode as SVG or PNG.

Updated
Drawn in your browser. Nothing is uploaded.

How to use the Barcode Generator

  1. Pick the Format and type the Value. For EAN, UPC, and ITF-14 you can leave out the last digit and it is calculated.
  2. Adjust the Bar width, Height, Show text, and colors.
  3. Press Download SVG for print or Download PNG for documents.

How it works

Barcodes are drawn as SVG by JsBarcode. EAN, UPC, and ITF-14 end with a GS1 check digit:

  1. Starting from the rightmost data digit, multiply the digits alternately by 3 and 1.
  2. Add the results.
  3. The check digit is the number that brings the sum up to the next multiple of 10.

A wrong check digit is reported with the correct one. Code 39 accepts A-Z, 0-9, space, and - . $ / + %; lowercase is converted. Code 128 accepts any ASCII text.

Examples

  • UPC-A 03600029145: 0×3 + 3×1 + 6×3 + 0 + 0×3 + 0 + 2×3 + 9 + 1×3 + 4 + 5×3 = 58 → check digit 2, giving 036000291452.
  • EAN-13 400638133393 → check digit 1, giving 4006381333931.
  • ITF-14 1234567890123 → check digit 1.

Which barcode to use

FormatContentTypical use
EAN-1312 digits + checkRetail products worldwide
UPC-A11 digits + checkRetail products in the US and Canada
EAN-87 digits + checkSmall retail packs
ITF-1413 digits + checkShipping cartons
Code 128Any ASCII textShipping labels, internal IDs
Code 39A-Z, 0-9, a few symbolsIndustry, ID badges, older systems

Limitations

  • Retail barcodes (EAN, UPC) need a company prefix from GS1 to be valid in stores. Made-up numbers work for testing only.
  • Print at a size scanners can read: bars too thin or too short fail. Test with a real scanner before a print run.
  • 2D codes are made with the QR Code Generator.

Frequently asked questions

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

UPC-A has 12 digits and is used in North America; EAN-13 has 13 and is used worldwide. A UPC-A code is the same as an EAN-13 with a leading 0.

How is a barcode check digit calculated?

For EAN, UPC, and ITF-14, digits are weighted 3 and 1 alternately from the right, summed, and the check digit rounds the sum up to a multiple of 10.

Can I use these barcodes on products I sell?

Only with numbers assigned to your company by GS1. The generator draws any number, but stores and marketplaces check the prefix.

Is anything uploaded?

No. The barcode is drawn in your browser.

Often used together with the Barcode Generator.

  • QR Code Generator

    Creates QR codes for links, Wi-Fi, contacts, and more, as PNG or SVG.

  • QR Code Scanner

    Reads QR codes from images, pasted screenshots, or the camera, in the browser.