Skip to main content

Barcode Generator

Generate Barcode

Letters, digits and symbols. The most common choice for labels and logistics.

​

Bar width 2

Bar height 100

Quiet zone (margin) 10

Font size 20

Text spacing 2

Text alignment

For reliable scanning, use dark bars on a light background.
Try an example:
Code 128 · Toolser Net

Choose a barcode type, type a number or text, and the barcode generator draws the barcode instantly. Download it as PNG, as a 4× PNG for printing or as a vector SVG, or print it directly. It supports Code 128, Code 39, EAN-13, UPC-A, EAN-8 and ITF-14, calculates check digits for EAN, UPC and ITF-14 automatically, and tells you exactly what is wrong when the content does not fit the format. For a 2D code that holds a link or text, use the QR Code Generator.


How to use the barcode generator​

  1. Choose the Barcode Type. If you are not sure, use Code 128: it takes letters, digits and symbols. Retail products use EAN-13 (or UPC-A in the US and Canada).
  2. Type the number or text in Barcode content; the barcode updates as you type. For EAN-13, enter just the first 12 digits and the check digit is added for you.
  3. Open Size and text or Colors to change the bar width and height, the Quiet zone (margin), the text below the bars and the colors.
  4. Press Download and choose PNG, a 4× PNG for printing or SVG (vector), or press Print.
  5. Not sure where to start? Press one of the examples: a product barcode, an inventory label or a shipping carton.

Which barcode type should I use?​

TypeWhat it can holdLengthTypical use
Code 128Letters, digits and symbols (ASCII)VariableShipping, warehouses, asset tags, the most versatile
Code 39Capital letters, digits, space and - . $ / + %VariableID badges, industrial and government labels
EAN-13Digits13 with check digitRetail products worldwide, books (ISBN)
UPC-ADigits12 with check digitRetail products in the US and Canada
EAN-8Digits8 with check digitVery small packages
ITF-14Digits14 with check digitShipping cartons and cases
CodabarDigits and - $ : / . +VariableLibraries, blood banks and other older systems

1D barcodes cannot hold Chinese characters, accented letters or emoji. Code 128 only encodes ASCII letters, digits and symbols. To store a link or any other text, use a QR code.

Getting an EAN or UPC number for your product​

To sell a product in stores or on most marketplaces, its barcode number has to come from GS1, the organization that issues product numbers. In the US you get a company prefix from GS1 US; other countries have their own GS1 office. An EAN-13 or UPC number is made of:

  • GS1 prefix and company number: issued by GS1; the length depends on how many products you need
  • Item number: assigned by you, one per product variant (size, color, flavor)
  • Check digit: the last digit, calculated from the others

This tool only draws the barcode; it does not issue numbers. A number you make up is fine for practice and internal labels, but it is not a valid product barcode and may clash with someone else's product.

How the check digit is calculated​

The last digit of EAN-13, EAN-8, UPC-A and ITF-14 is a check digit that lets the scanner detect misreads. Take the 12 digits 012123456789:

  1. Starting from the right, multiply every other digit by 3 (the 1st, 3rd, 5th… from the right) and add everything up: 9×3 + 8 + 7×3 + 6 + 5×3 + 4 + 3×3 + 2 + 1×3 + 2 + 1×3 + 0 = 100
  2. Take the last digit of the sum (0) and subtract it from 10: 10 − 0 = 10. A result of 10 means the check digit is 0.
  3. The full barcode is 0121234567890.

The generator does this for you. If you enter all 13 digits, it checks that the last one is correct and shows the right one if it is not.

Printing and scanning tips​

  • Don't shrink it too much. The standard EAN-13 symbol is about 37.29 × 25.93 mm including the digits, and it can usually be scaled between 80% and 200%. Bars that are too thin are hard to scan.
  • Keep the quiet zone. Leave blank space on both sides: about 11 bar widths on the left and 7 on the right for EAN-13, and at least 10 for Code 128. The Quiet zone (margin) setting controls this.
  • Dark bars on a light background. Black on white is the safest. Red bars, dark backgrounds or transparent backgrounds often can't be read.
  • Use SVG or the 4× PNG for print. SVG is a vector file that stays sharp at any size, which is what print shops and design software want; the 4× PNG works well for label printers and documents.
  • Test-scan a printed sample with a scanner or a phone app before printing in bulk.

Barcode or QR code?​

A barcode (1D barcode) is a single row of bars of different widths. It holds a short ID, usually digits or letters, and cheap scanners read it very fast, which is why stores and warehouses use it. A QR code is a 2D code that can hold a URL, contact details or longer text and can be scanned with a phone camera. For links and contact details, use the QR Code Generator; to read a code from an image or the camera, use the QR Code Scanner.

FAQ​

Is the barcode generator free? Can I use the barcodes commercially?​

Yes, it is free and needs no sign-up. You can use the barcode images commercially, with no watermark and no expiry. The product number itself must come from GS1 if you sell through retailers; the tool only draws the barcode.

Can I sell products with an EAN-13 I made up here?​

No. Retail EAN-13 and UPC numbers must be based on a company prefix from GS1. The tool can turn a number you got from GS1 into a barcode, but a made-up number may belong to another company's product.

Why do I only enter 12 digits for EAN-13?​

The 13th digit is the check digit, calculated from the first 12, so the tool adds it for you. If you enter all 13 digits, it checks the last one and tells you the correct check digit if it is wrong.

My barcode won't scan. What should I check?​

First make sure you chose the right type (for example EAN-13 for products). Then check whether it was printed too small or blurry, whether there is enough blank space on both sides, and whether the contrast is good (dark bars on a light background). Printing the SVG or the 4× PNG slightly larger often fixes it.

Can a barcode contain Chinese characters, accents or emoji?​

Not a 1D barcode. Code 128 only encodes ASCII letters, digits and symbols, and Code 39 only capital letters, digits and a few symbols. Use a QR code for any other text.

Should I download PNG or SVG?​

PNG is fine for documents and websites. For printing, enlarging or design software, use SVG (vector, always sharp) or the 4× PNG.