Skip to content
Free, no sign-up, in your browser

Barcode Generator for EAN, UPC, and Code 128

Create a barcode for free without signing up using the barcode generator. Choose EAN-13, EAN-8, UPC-A, Code 128, or Code 39. For EAN and UPC, the tool calculates the check digit automatically, and you can download the barcode as PNG or SVG. It's created directly in your browser; your input is not sent anywhere.

Built by Luca Stanek

Do you sell products with barcodes? Get fast, reliable web hosting for your store.

Retail in Europe: 12 digits; we'll calculate the check digit.

Display

9012341234575

226 × 131 px

Result

5901234123457

Check digit 7 was calculated and appended.

5×1 + 9×3 + 0×1 + 1×3 + 2×1 + 3×3 + 4×1 + 1×3 + 2×1 + 3×3 + 4×1 + 5×3 = 83. Check digit = (10 − 83 mod 10) mod 10 = 7.

113 modules wide. At a nominal width of 0.33 mm per module, that’s 37.29 mm.

Example result

Turn 590123412345 into EAN-13 5901234123457

9012341234575
Check digit calculation
5×1 + 9×3 + 0×1 + 1×3 + 2×1 + 3×3 + 4×1 + 1×3 + 2×1 + 3×3 + 4×1 + 5×3 = 83. Check digit = (10 − 83 mod 10) mod 10 = 7.
Structure
95 modules: start pattern, 6 digits on the left, center pattern, 6 digits on the right, end pattern. Plus an 11-module quiet zone on the left and a 7-module one on the right.

Overview

Create barcodes online for free in your browser

The Barcode Generator creates barcodes in five formats: EAN-13, EAN-8, UPC-A, Code 128, and Code 39. For EAN and UPC, it automatically calculates the check digit and shows the calculation. Download the finished barcode as a PNG or SVG vector graphic. Everything runs in your browser: your numbers are neither stored nor sent, and the barcode has no watermark.

Five formats

EAN-13, EAN-8, and UPC-A for retail products; Code 128 and Code 39 for text, warehouses, and inventory.

Check digit included

If the check digit is missing, it is calculated and appended. If it is incorrect, the tool shows the correct digit and lets you fix it with a click.

PNG and SVG

PNG for documents, SVG as a vector graphic for printing and design software.

Print width in mm

For EAN and UPC, the tool shows the width including quiet zones at the nominal size of 0.33 mm per module.

How it works

How to create a barcode

Step 1

Choose barcode type

EAN-13, EAN-8, or UPC-A for retail products; Code 128 for any ASCII text; Code 39 for uppercase letters and digits.

Step 2

Enter a number or text

For EAN and UPC, just enter the number without the check digit: the tool calculates and appends it, and shows the calculation. If an included check digit is wrong, you can correct it with a click. The barcode appears immediately.

Step 3

Customize appearance

If needed, adjust the module width (1 to 8 px), bar height (30 to 300 px), text below the barcode, and bar and background colors.

Step 4

Download as PNG or SVG

PNG for documents, SVG as a vector graphic for print and layout.

Barcode types

Which barcode suits which purpose?

FormatCharactersTypical use
EAN-1313 digitsRetail products in Europe, books (ISBN).
EAN-88 digitsVery small packages.
UPC-A12 digitsRetail products in the US and Canada; equivalent to EAN-13 with a leading 0.
Code 128Any ASCII text, up to 80 charactersShipping, inventory, serial numbers. More compact than Code 39; digit pairs save space.
Code 39A to Z, 0 to 9, hyphen, period, space, $, /, +, and %, up to 40 charactersInventory, ID cards, industry. Simple, but wider than Code 128.

Check digit

Calculate an EAN check digit: how the generator works

EAN-13, EAN-8, and UPC-A use the same rule: Starting from the right, the digits are alternately weighted by 3 and 1, then added. The check digit brings the sum up to the next multiple of 10.

If you enter the number without a check digit (12 digits for EAN-13, 7 for EAN-8, 11 for UPC-A), the tool adds it. If you include one, the tool checks it. If it is incorrect, the tool shows the correct digit and replaces it when you click “Correct check digit.” Spaces and hyphens in the number are ignored.

Guide

Print and scan barcodes

  • Dark bars on a light background, ideally black on white. Many scanners cannot read inverted barcodes.
  • Keep the quiet zone clear: for EAN-13, that's 11 modules on the left and 7 on the right.
  • The nominal size of an EAN-13 is 37.29 × 25.93 mm, scalable from 80% to 200%.
  • The SVG file is suitable for printing: as a vector graphic, it stays sharp when scaled.
  • GS1 assigns retail numbers (GTINs). For warehouses and inventory, your own numbering scheme is enough, for example with Code 128.

Explore more

More tools

FAQ

Barcode Generator FAQ

Answers about check digits, formats, print size, and scanning.

Yes, with no sign-up or watermark. The barcode is generated in your browser; your inputs are neither stored nor sent.

The twelve digits are alternately weighted by 1 and 3, starting with 1 on the left, and added together. The check digit brings the sum up to the next multiple of 10. For 590123412345, the sum is 83, so the check digit is 7. If an entered check digit is wrong, the tool shows the correct one and lets you fix it with a click.

UPC-A has 12 digits and comes from the USA and Canada. It corresponds to an EAN-13 with a leading 0; modern scanners read both. For products in Europe, use EAN-13.

Code 128 encodes ASCII text of up to 80 characters and is more compact. Code 39 supports only A to Z, 0 to 9, and hyphens, periods, spaces, $, /, + and %, with up to 40 characters. Neither format supports umlauts, accented letters or characters such as €.

The tool draws any valid number but does not assign one. GS1 assigns unique trade item numbers (GTIN), and retailers and many marketplaces require GS1-registered numbers. For storage and inventory, your own numbering scheme is enough, for example with Code 128.

Download as PNG for documents or as an SVG vector graphic for printing and layout. Insert the file like any other image, for example in Word or Excel. Before downloading, you can set the module width, bar height, text below the barcode, and bar and background colours. The tool creates one barcode per download; bulk import is not available.

A barcode such as EAN-13 or Code 128 is one-dimensional: information is encoded in the widths of bars and spaces. A QR code is two-dimensional and holds more data, such as long links. This generator creates only the five one-dimensional formats; use the separate QR code generator for QR codes.

The nominal size is 37.29 × 25.93 mm including quiet zones; 80% to 200% is permitted. The tool shows you the width at 0.33 mm per module.

Common causes include poor contrast, cropped quiet zones, a size that's too small, or inverted colors. Print dark bars on a light background, leave the margins clear, use at least 80% of the nominal size, and check the check digit.

Any more questions?

Contact Support
More than just barcodes

Selling products online? Your shop needs a reliable server.

With web hosting or a VPS from ZAP-Hosting, your online store stays reliably online.

4.4/5 Trustpilot32,000+ Active serversSince 2010

No setup. No risk. Online in seconds.

Flexible TermCancel anytimeOnline in 60 seconds

Looking for more tools? View all QR & barcode tools