Barcode Generator

Type a number or text to get an EAN-13, UPC-A, Code 128 or other barcode instantly, with the check digit worked out, as SVG or PNG.

  • GS1 and ISO/IEC encoding
  • Check digit calculated
  • Made in your browser

Barcode settings

For EAN, UPC and ITF-14 you can leave off the last digit; the check digit is calculated for you. PNG files are saved at 3× the size shown.

Enter a number or text.

How it works

Pick a format and type your data: the barcode is drawn instantly in your browser. For EAN-13, UPC-A, EAN-8 and ITF-14 you can type the number with or without its check digit. If you leave it off, it is calculated; if the last digit you typed is wrong, you see the correct one instead of a barcode that would fail at the till. Code 128 switches between character set B (text) and set C (pairs of digits) on its own, so long runs of numbers take half the space.

Set the bar width, height, quiet zone and colours, then download a vector SVG for print and design software, a PNG at three times the preview size, or copy the SVG code into a web page. Everything is encoded on your device and nothing is uploaded.

GS1 check digit = (10 − (3 × sum of the digits in odd positions from the right + sum of the other digits) mod 10) mod 10

Which barcode format to use

FormatWhat it holdsTypical use
EAN-1313 digits (12 + check digit)Consumer products sold in shops and online almost everywhere outside North America; also books (ISBN starting 978/979)
UPC-A12 digits (11 + check digit)Retail products in the United States and Canada; every till that reads EAN-13 also reads UPC-A
EAN-88 digits (7 + check digit)Very small packs such as cosmetics or sweets, where an EAN-13 does not fit; the numbers are issued individually by GS1
Code 128Any printable ASCII text: letters, digits, space and symbolsShipping and warehouse labels, stock and asset tags, order numbers and other internal codes
ITF-1414 digits (GTIN-14 with check digit)Outer cases and cartons of trade items; tolerates rough printing on corrugated board
Code 39A–Z, 0–9, space and - . $ / + %Older industrial, automotive and defence systems, ID badges; wide, so use only where a system requires it

Code 128 here is plain Code 128. GS1-128 shipping labels with application identifiers such as (00) or (01) need the special FNC1 character and are not produced by this tool.

A barcode is not a registered product number

This generator draws any number that is valid in structure, but drawing a barcode does not register the number or reserve it for you. EAN-13, UPC-A, EAN-8 and ITF-14 numbers used in stores and on marketplaces are GTINs: they must start with a GS1 Company Prefix that your local GS1 member organisation licenses to your business. Retailers and marketplaces check the numbers against the GS1 registry, so made-up or resold numbers can clash with another company’s product or be rejected.

For labels that never leave your own shop or warehouse, GS1 reserves EAN-13 numbers starting with 20–29 for restricted, in-house use, or you can simply put your own SKU or order number in Code 128.

Print tips

  • Size: a standard EAN-13 is 37.29 × 25.93 mm including its quiet zones (0.33 mm per module). For retail scanning GS1 allows 80% to 200% of that size; don’t shrink below 80% or cut the bars shorter.
  • Contrast: print dark bars (black, dark blue, dark green) on white or a light background. Avoid red bars, which disappear under the red light of laser scanners, and never invert the colours.
  • Quiet zone: keep the margin clear of text and graphics: at least 11 modules on the left and 7 on the right of an EAN-13, and 10 modules for Code 128, ITF-14 and Code 39.
  • Sharp edges: use the SVG for professional print. For a PNG, choose a bar width that is a whole number of printer dots; at 300 dpi, 4 px per module is 0.34 mm, close to 100% size. Don’t stretch the image unevenly.
  • Test before printing in bulk: scan a sample print with several phones or scanners. For products going to retail, a barcode verification (ISO/IEC 15416 print quality grade) is worth doing.

Standards and sources

Last reviewed November 13, 2026

Frequently asked questions

Can I use these barcodes on products I sell in shops or on Amazon?

Only with a number that belongs to you. The generator draws any valid number but does not register it. Retailers and marketplaces check product barcodes against the GS1 registry, so get a GS1 Company Prefix from your local GS1 organisation and create your numbers from it.

Do I have to type the check digit?

No. Enter 12 digits for EAN-13, 11 for UPC-A, 7 for EAN-8 or 13 for ITF-14 and the check digit is added. If you type the full number, its last digit is checked and you are shown the correct one if it does not match.

Which format should I use for shipping labels or inventory?

Code 128. It holds letters, digits and symbols and is the most compact of the common linear barcodes, especially for long numbers. Use ITF-14 for the GTIN on outer cartons, and Code 39 only when an existing system asks for it.

SVG or PNG?

SVG is a vector file that stays perfectly sharp at any size, which suits label software, print shops and design tools. PNG is saved at three times the preview size and works anywhere an image is accepted.

Why won’t my barcode scan?

The usual causes are printing too small, low contrast or red bars, text or edges touching the quiet zone, or an image that was stretched. Print at 100% or larger with dark bars on white and test it with a phone before printing many copies.

Related tags

Other tools

Results are for reference only. Calculations may be wrong and are not legal, medical or financial advice. Always confirm with the relevant authority or a professional before important decisions.

Search