Skip to content

Online Barcode Generator

Enter a number or text and download your barcode as SVG or PNG. We calculate the EAN and UPC check digit and set the quiet zone for each format.

Generation mode

Barcode settings

Generated barcode

Enter data and generate a barcode.

How to create a barcode online

  1. 1 Pick a barcode type. EAN-13 or UPC-A for retail products, Code 128 for warehouse and internal labels, Data Matrix for small parts.
  2. 2 Enter a number or text. For EAN-13, 12 digits are enough and we add the check digit. Spaces and hyphens are removed.
  3. 3 If needed, adjust the bar height, scale, quiet zone and colors. The defaults follow GS1 recommendations.
  4. 4 Download the barcode as SVG for print or PNG for documents, or copy the SVG code.

No sign-up, no watermark and no limit on how many barcodes you create. You can use the generated barcodes commercially too. For whole label runs, switch to Bulk: up to 500 codes at once, downloaded as a ZIP or an A4 PDF sheet.

Your data stays in your browser

The barcode is created right on your device. Product numbers, batch numbers and serial numbers are never sent to a server or stored anywhere. The code is drawn by the open-source bwip-js library.

Tips for a barcode that scans

  • Print dark bars on a light background. Scanners use red light, so red, orange and yellow bars are invisible to them.
  • Leave an empty quiet zone around the barcode. The generator sets it for each format, for EAN-13 it is 11 modules on the left.
  • Do not shorten the bars. A low barcode is harder to read, especially when the scanner is held at an angle.
  • Choose SVG for print. A PNG image gets blurry when enlarged and the bar edges lose their sharpness.
  • Before printing a whole batch, print one label and test it with a scanner or your phone.

Which barcode do you need

The generator supports 10 formats. Click a format and the form above switches to it, sample value included.

EAN-13 generator for retail products

The standard product barcode in Europe and most of the world. It has 13 digits and the last one is the check digit. To sell in stores, you need a number assigned by GS1.

EAN-8 for small packages

A shorter barcode for products too small for an EAN-13, such as chewing gum, lipstick or small tubes. GS1 assigns EAN-8 numbers separately.

UPC barcode generator for the US and Canada

The 12-digit retail barcode used in the US and Canada. A UPC-A is the same number as an EAN-13 with a leading zero, so checkouts in Europe read it too.

Code 128 generator for warehouse and internal labels

Encodes letters, digits and punctuation. Great for SKUs, inventory, tickets and shipments. Accented characters are not supported.

GS1-128 generator for logistics labels

Carries data with Application Identifiers: GTIN (01), batch or lot (10), expiration date (17) or serial number (21). Used on cartons and pallets.

ITF-14 generator for shipping cartons

The 14-digit code for outer cases. The bearer bar frame around the bars protects the code when printed on corrugated cardboard, where ink tends to spread.

Code 39 for legacy systems

A simple barcode with uppercase letters and digits, common in manufacturing, healthcare and on ID badges. For new labels, Code 128 is more compact.

Data Matrix generator for small parts and medicines

A small square 2D code that holds hundreds of characters. You will find it on medicines, electronics and industrial parts. It also handles accented and other Unicode characters.

PDF417 for IDs and tickets

A stacked 2D code for longer data. Used on boarding passes, driver's licenses and ID cards, and shipping documents.

Aztec for travel tickets

A compact 2D code that needs no quiet zone. You typically see it on train and airline tickets on your phone.

What the numbers in an EAN barcode mean

An EAN-13 is a 13-digit GTIN written as bars. It has four parts:

590
GS1 prefix. The first two or three digits. They show which national GS1 organization issued the number, for example 590 is GS1 Poland and 500 is GS1 UK.
1234
Company number. Assigned by GS1 to the manufacturer or brand owner. Together with the prefix it forms the GS1 Company Prefix.
12345
Item number. Chosen by the company itself. Every product, pack size and color gets its own number.
7
Check digit. Calculated from the previous 12 digits. It lets the checkout catch a misread barcode.

The length of the company number and item number depends on how many numbers the company licensed from GS1. Together they always have 9 to 10 digits.

How to calculate the EAN-13 check digit

You can calculate the barcode check digit for 590123412345 in four steps:

  1. 1 Add up the digits in odd positions: 5 + 0 + 2 + 4 + 2 + 4 = 17.
  2. 2 Add up the digits in even positions and multiply the result by three: (9 + 1 + 3 + 1 + 3 + 5) × 3 = 66.
  3. 3 Add both results together: 17 + 66 = 83.
  4. 4 The check digit is the difference to the next multiple of ten: 90 - 83 = 7. The full code is 5901234123457.

EAN-8, UPC-A and ITF-14 work the same way, with weights 3 and 1 always alternating from the last digit before the check digit. The generator adds the check digit for you and validates it when you enter the full number.

Barcode country codes: what 0, 590 or 690 mean

The first three digits of an EAN barcode (the prefix) tell you which national GS1 organization issued the number. They do not tell you where the product was made. A US company can manufacture in China and still sell under a US prefix, and a German retail chain puts its 40x codes on goods made in Poland. A 12-digit UPC-A code has an implied leading zero, so it falls into the US ranges.

Prefix Issued by
000-019, 030-039, 060-139 GS1 US (United States)
754-755 GS1 Canada (Canada)
500-509 GS1 UK (United Kingdom)
400-440 GS1 Germany (Germany)
300-379 GS1 France (France)
800-839 GS1 Italy (Italy)
840-849 GS1 Spain (Spain)
870-879 GS1 Netherlands (Netherlands)
590 GS1 Poland (Poland)
858 GS1 Slovakia (Slovakia)
859 GS1 Czech (Czech Republic)
599 GS1 Hungary (Hungary)
900-919 GS1 Austria (Austria)
760-769 GS1 Switzerland (Switzerland)
690-699 GS1 China (China)
450-459, 490-499 GS1 Japan (Japan)
880-881 GS1 Korea (South Korea)
890 GS1 India (India)
930-939 GS1 Australia (Australia)

Prefixes with a special meaning

200-299
In-store codes, for example variable-weight items, bakery goods or the store's own labels. They only work in that store.
978-979
Books. The EAN-13 is simply the ISBN-13 without hyphens.
977
Magazines and periodicals with an ISSN.
952
Reserved for demos and testing. Handy for sample data, it is never assigned to a real product.

How to get a barcode number for your product

Valid EAN and UPC numbers for retail come from your local GS1 Member Organization, for example GS1 US in the United States or GS1 UK in Britain. Your company gets its own GS1 Company Prefix and uses it to create a number (GTIN) for each product. GS1 charges a fee, and each member organization publishes its current pricing.

No law requires a barcode, but without one your product will usually not get into retail chains, large online stores or online marketplaces.

Watch out for cheap barcodes sold online. They often belong to another company, and retailers that check the GS1 database will reject them.

When you do not need an EAN

For internal warehouse labels, asset tags, tickets or your own in-store codes, a Code 128 or the in-store prefix 200-299 is enough. You create these codes yourself and GS1 is not involved.

Barcode size for printing

At 100 %, an EAN-13 measures 37.29 × 25.93 mm including margins and digits. GS1 allows scaling down to 80 % and up to 200 %, but the aspect ratio stays the same.

The generator sets bar height and quiet zone in modules, which are multiples of the narrowest bar width. With a 0.33 mm module, the default EAN-13 height matches the nominal 22.85 mm.

Cartons and pallets use ITF-14 or GS1-128 with a bar height of at least 31.75 mm.

Barcodes in Excel, Word, Google Sheets or Canva

The easiest way is to generate the barcode here and insert it as an image. In Excel and Word use Insert > Pictures, in Google Sheets Insert > Image, in Canva use Uploads. An SVG stays sharp at any size and newer versions of Office insert it directly.

A barcode font for Excel or Word works out of the box only for Code 39, where you wrap the text in asterisks, for example *ABC123*. Code 128 and EAN-13 need start, stop and check characters, so the font alone without a macro produces a barcode that scanners cannot read.

Barcode types compared

1D or 2D barcode

Linear (1D) barcodes like EAN or Code 128 carry a short number and every scanner reads them. 2D codes like Data Matrix hold hundreds of characters in a small area, but they need a camera-based scanner.

Data Matrix or QR code

Data Matrix is smaller and takes up less space for the same data, which is why it is printed on parts and medicines. For links aimed at customers, a QR code is better because any phone opens it. Make one with the QR code generator.

Code 128 vs Code 39

For the same text, Code 128 is roughly a third shorter and supports lowercase letters. Choose Code 39 only when a legacy system or a customer requires it.

EAN-13, EAN-8 or UPC-A

EAN-13 is the standard in Europe and most of the world, EAN-8 is for small packages and UPC-A is for the US and Canada. All three belong to the GTIN system and every checkout reads them.

Related Tools

More generators for test data, codes and placeholder content.

FAQ

Frequently asked questions

Is this barcode generator free?

Yes. You can create barcodes without signing up, without a watermark and without any limit. You can also use them commercially, for example on labels or packaging.

Which barcode type should I choose?

Use EAN-13 or UPC-A for retail products, EAN-8 for small packages, ITF-14 for cartons and GS1-128 for logistics labels with an expiration date or batch number. Code 128 is enough for internal labels, warehouses and inventory. For small parts and longer data, choose Data Matrix.

Can I make up my own EAN or UPC number?

For testing and demos, yes. The generator creates a technically valid barcode with a correct check digit. To sell in stores, though, the number must come from GS1. A made-up number may belong to another product, and the retailer will reject it.

What does a barcode starting with 590 or 690 mean?

A barcode starting with 590 was issued by GS1 Poland, and 690-699 by GS1 China. The prefix tells you where the company that got the number is registered, not where the product was made.

Can a barcode tell me the country of origin?

Not reliably. A company uses a number from its home country even when it manufactures elsewhere, and retail chains put their own brand on goods from all over the world. Check the "Made in" information on the label instead.

What does a barcode starting with 2 mean?

Prefixes 200 to 299 are in-store codes. Stores use them for variable-weight items, bakery goods or their own labels, and they may not work in another store. On variable-weight items, the code often contains the price or weight too.

How do I calculate the EAN-13 check digit?

Add up the digits in odd positions, add three times the sum of the digits in even positions, and round the result up to the next multiple of ten. The difference is the check digit. There is a worked example above on this page, and the generator calculates the check digit for you.

GTIN vs EAN: what is the difference?

A GTIN is the product number itself, and EAN-13 is the barcode used to write that number. Depending on use, a GTIN has 8, 12, 13 or 14 digits and is encoded as EAN-8, UPC-A, EAN-13 or ITF-14.

How do I create a barcode in Excel, Word or Google Sheets?

Generate the barcode here, download it as SVG or PNG and insert it via Insert > Pictures (Insert > Image in Google Sheets). A barcode font works without a macro only for Code 39. For Code 128 and EAN-13, a font alone is not enough because the check characters are missing.

Can I create multiple barcodes at once?

Yes. Switch the generator to Bulk and enter one value per line, or fill a number sequence from the first value, with check digits added for EAN and UPC. You can create up to 500 codes at once and download them as a ZIP of SVG or PNG files, or as an A4 PDF sheet ready to print.

How do I scan a barcode with my phone?

Google Lens or a barcode scanner app reads it. The built-in camera app reliably handles QR codes, but support for EAN or Code 128 depends on the phone. A handheld USB scanner works like a keyboard and types the scanned number wherever your cursor is.

Why won't my barcode scan?

The most common causes are low contrast, red or yellow bars, a missing quiet zone, a barcode printed too small or a blurry enlarged PNG. Also check that the check digit is correct and that your scanner supports the format.

Can a barcode contain accented characters?

EAN, UPC, Code 128 and Code 39 do not support accented characters. Encode text with accents or non-Latin characters as Data Matrix, PDF417 or Aztec, and the generator stores it in UTF-8 so it scans correctly.

How do I create a barcode for a book (ISBN)?

Choose EAN-13 and enter the ISBN-13 without hyphens, for example 9780123456786. The ISBN-13 and EAN-13 check digits are the same. The ISBN itself is assigned by your national ISBN agency.

SVG or PNG?

SVG is a vector format that scales without losing quality, so it is best for print and design files. PNG works well in documents, emails and anywhere vector images are not supported.