Barcode Generator

Create EAN-13, EAN-8, Code 128, Code 39 and QR Code barcodes and download them as PNG or SVG.

Enter 12 digits and the 13th digit (check digit) is calculated automatically.

2 px
Narrow (1px)Wide (5px)
100 px
50px300px

Colors

This free barcode generator lets you create barcode images in EAN-13, EAN-8, Code 128, Code 39 or QR format, customise the colour, size and text, and download them as PNG or SVG. Use it as an EAN-13 generator, a Code 128 generator or a UPC barcode generator — a simple barcode maker to generate barcode online, entirely in your browser, with no sign-up and no data uploaded.

What Is a Barcode?

A barcode is a machine-readable optical data-encoding system made of parallel lines and spaces. It makes data such as product information, stock codes, prices and serial numbers quickly processable with scanner devices. First used in supermarkets in the 1970s, this technology is now indispensable infrastructure for retail, logistics, healthcare, automotive and manufacturing.

Classic 1D barcodes (EAN-13, Code 128, Code 39) store data in a single row of lines, while the 2D barcode standard QR Code stores data both horizontally and vertically, encoding far more information in a small space.

How to Create a Barcode

With this free barcode generator you can create a barcode in minutes in 2026:

  1. Choose a barcode type: EAN-13, EAN-8, Code 128, Code 39 or QR Code
  2. Enter the data: product code, text, URL or serial number
  3. Customise: bar width, height, line color and background color
  4. Click "Generate Barcode" — an instant preview appears
  5. Download: PNG (digital) or SVG (vector for printing)

Everything runs in your browser; the data you enter is never sent to a server.

Barcode Types and Where They Are Used

Choosing the right barcode type depends on the use case. The table below compares common barcode types:

Barcode TypeData TypeMax CapacityUsed For
EAN-13Digits only13 digitsRetail product labels, store shelves
EAN-8Digits only8 digitsSmall packaging, cosmetics, pharma
Code 128All ASCII~48 charactersShipping, logistics, warehousing
Code 39A-Z, 0-9, symbols~20 charactersAutomotive, defense, industry
QR Code (2D)URL, text, vCard~4,296 charactersMobile, marketing, digital content

EAN-13 and EAN-8: Retail Barcodes

EAN-13 (International Article Number) is the standard barcode used on retail products worldwide. The first digits are a GS1 country/region prefix, the next digits identify the manufacturer and product, and the final digit is a check digit calculated mathematically from the first 12 — this tool adds the check digit automatically when you enter 12 digits. EAN-8 is the shortened 8-digit version for small-packaged products (chocolate bars, lipstick, small medicine boxes).

Code 128: The Flexible Industrial Barcode

Code 128 is a high-density standard supporting all ASCII characters (upper/lowercase letters, digits, symbols). It has three subsets: A (control characters), B (upper/lowercase letters), C (double-digit compression). Code 128 is preferred for shipping labels, warehouse shelf coding and hospital wristbands. This tool selects the subset automatically based on your input.

Code 39: The Industry-Standard Barcode

Code 39 (also known as 3-of-9) is an old but reliable standard supporting uppercase letters (A-Z), digits (0-9) and a few special characters. A check digit is optional. It is used in automotive (part numbers), the US defense supply chain and some healthcare applications. For data with lowercase letters, prefer Code 128.

PNG vs. SVG: Which Should You Choose?

The download format depends on how you'll use it:

  • PNG: for websites, email, Word documents and social-media posts. Supported by every program; pixel-based, so resizing reduces quality.
  • SVG: for print, large-format labels, laser cutting and vector design software like Illustrator/Inkscape. Scales to any size without loss — ideal for print quality.

For small product labels, a 300+ DPI PNG is preferred. For posters or large-format printing, choose SVG.

Barcode Generation Use Cases

  • E-commerce: turn a product inventory code into an EAN-13 barcode to speed up warehouse management
  • Shipping: convert a tracking number into a Code 128 barcode and print the label
  • Cafe / restaurant: add a menu URL to a QR code for a tabletop barcode
  • Events: Code 39 or Code 128 barcodes for ticket verification
  • Library: convert an ISBN into an EAN-13 barcode for book labeling
  • Healthcare: Code 128 for medicine packaging, patient wristbands and medical-supply tracking
  • Manufacturing: Code 39 for part numbers, batch codes and quality-control labels

How to Choose a Barcode Color

The standard barcode color is black bars on a white background. You can also create colored barcodes that match your brand, but follow two rules:

  • Sufficient contrast: the brightness difference between bars and background must be high. Red, orange or yellow bars can cause problems with some readers; laser readers cannot see red.
  • Light background: the background should always be lighter than the bar color; a light barcode on a dark background is not recommended.

Test your color choice with a real barcode reader before printing.

Barcode Size and Scannability

The smaller the physical barcode, the harder it is to scan. General rules:

  • Recommended minimum print size for EAN-13: 37.29 mm × 26.26 mm (80% of the original size)
  • A higher bar width (Wide setting) produces a larger but more reliable barcode
  • Reducing the bar height lowers scanning success; be careful with barcodes under 50px
  • SVG is preferred for label design because it scales to any size in print

Barcode Generator Security and Privacy

This barcode generator works entirely client-side. The product code, stock number or URL you enter is not sent to a server; all calculation and image generation happen in browser memory. You can use commercial or personal data safely.

About GS1 Barcodes and Marketplaces

In EAN-13, the leading digits are a GS1 prefix that identifies the country/region of the issuing GS1 organization. GS1 assigns a company prefix to businesses, and product codes plus a check digit are built from it to produce barcodes. Products that require official GS1 registration need GS1 membership. However, for internal stock tracking, testing and prototype production, you can generate barcodes for free with this tool.

E-commerce platforms (Amazon, eBay and others) may require a valid EAN-13 / UPC barcode when listing products. Barcodes produced with this tool are standard in format and appearance; however, codes generated outside official GS1 membership may not be accepted on some marketplaces.

Frequently Asked Questions About the Barcode Generator

A barcode is an optical data-encoding system made of parallel lines and spaces. It makes information such as a product code, price or serial number machine-readable with scanner devices. EAN-13 is common in retail, Code 128 in logistics, and QR codes for mobile and digital content.

The check digit is the 13th digit added to verify the barcode's accuracy. It comes from a weighted sum of the first 12 digits by odd/even position: odd positions added directly, even positions multiplied by 3; the result is divided by 10 and the remainder subtracted from 10. In this tool you only enter 12 digits and the check digit is calculated automatically.

Use EAN-13 or EAN-8 for retail product labels; Code 128 for shipping, warehouse and logistics; Code 39 for automotive and industrial applications; QR codes for URLs, text and mobile content. Code 128 is the most flexible standard — it supports upper/lowercase and all ASCII characters.

A barcode system has three components: a barcode generator (like this tool), a printing setup (label printer) and a barcode reader (handheld terminal or phone camera). The barcode is downloaded as PNG/SVG, sent to the label printer and linked to your ERP/inventory software.

The Code 39 standard supports only uppercase letters (A-Z), digits (0-9) and a few special characters (-, ., $, /, +, %, space). For data with lowercase letters, we recommend Code 128.

PNG is enough for web, email and digital use. For printing, large-format labels and vector design programs like Illustrator or Inkscape, SVG is preferred because it scales to any size without loss of quality.

Couldn't find the answer you were looking for?

Explore all our tools and get the fastest answer to your question.

Go to All Tools