Skip to main content

DigitalCalculators.net

Barcode Generator

Last updated By the DigitalCalculators.net team Free, no sign-up

Make EAN-13, UPC-A and EAN-8 barcodes. Type the number without its last digit and the check digit is added for you, or type the full number to check it. Download as PNG or SVG.

Results

ItemValue
Bar patterns and check digits follow the EAN/UPC symbology used by GS1. A barcode only works in stores when the number itself is a real GS1 company prefix and product number assigned to you; making the picture does not register a number. Nothing is sent or saved.

Quick Answer

Choose EAN-13, UPC-A or EAN-8 and type the number. Leave off the last digit and the tool adds the correct check digit; type all the digits and it checks them. For example, 400638133393 gets check digit 1, making the EAN-13 4006381333931. Then download the barcode as PNG or SVG.

Last updated: 15 November 2026 ·How we calculate this: how the check digit and bars are made

How This Barcode Generator Works

Retail barcodes such as EAN-13 and UPC-A store a product number as black bars and white spaces of different widths. This tool draws them from the number you type, adds or checks the final check digit, and lets you download the image to use on labels, mock-ups or packaging artwork.

Barcode types:

  • EAN-13: 13 digits, used on most retail products worldwide.
  • UPC-A: 12 digits, common in the United States and Canada.
  • EAN-8: 8 digits, for small packages.
  • PNG and SVG: SVG stays sharp at any size for print.

How to Use the Barcode Generator

  1. Choose EAN-13, UPC-A or EAN-8.
  2. Type the number, with or without the check digit.
  3. Choose the bar width.
  4. Press Make barcode and check the details.
  5. Download the barcode as PNG or SVG.

How the Check Digit and Bars Are Made

  • Check digit: starting from the digit just before the check digit and moving left, multiply digits by 3, 1, 3, 1 and so on, add them up, and take (10 − total mod 10) mod 10.
  • Modules: each digit is 7 narrow units (modules) made of 2 bars and 2 spaces.
  • Guards: start 101, middle 01010 and end 101 tell the scanner where the code begins, splits and ends.
  • EAN-13: the first digit is not drawn as bars; it sets which of two patterns (L or G) each of the next 6 digits uses.
  • Size: EAN-13 and UPC-A are 95 modules wide, EAN-8 is 67, plus a white quiet zone on each side.

Key Terms

  • Check digit: the last digit, worked out from the others to catch typing mistakes.
  • Module: the narrowest bar or space width.
  • Quiet zone: the blank margin on each side of a barcode.
  • GS1: the organization that assigns retail barcode numbers.

Worked Example

Find the check digit for 400638133393.

  • From the right: 3×3 + 9×1 + 3×3 + 3×1 + 3×3 + 1×1 + 8×3 + 3×1 + 6×3 + 0×1 + 0×3 + 4×1
  • = 9 + 9 + 9 + 3 + 9 + 1 + 24 + 3 + 18 + 0 + 0 + 4 = 89
  • Check digit: (10 − 89 mod 10) mod 10 = (10 − 9) mod 10 = 1
  • Full EAN-13: 4006381333931

Real-Life Examples

  • EAN-13: 400638133393 plus check digit 1 = 4006381333931.
  • EAN-8: 7351353 plus check digit 7 = 73513537.
  • Checking a typo: if a 13-digit number fails, one digit is wrong.
  • Packaging mock-ups: place an SVG barcode in design software at any size.

Barcode vs QR Code

  • Barcode (EAN/UPC): one row of bars holding a short number, read by store scanners.
  • QR code: a square grid that can hold a web link or text, read by phone cameras.
  • Which to use: stores need EAN or UPC; links and contact details suit QR codes.

Barcode Types

TypeDigitsWidth in modulesTypical use
EAN-131395Retail products worldwide
UPC-A1295Retail in the US and Canada
EAN-8867Small packages

Tips for Printing Barcodes

  • Use a real number for stores: retail barcodes need a GS1 company prefix assigned to your business.
  • Keep the quiet zone: leave white space on both sides of the bars.
  • Black on white works best: scanners need strong contrast.
  • Do not squash it: keep the width and height in proportion when you resize.
  • Test before printing many: scan a printed sample with a phone or store scanner.

Common Mistakes to Avoid

  • Making up a store number. Retailers need GS1-assigned numbers.
  • Wrong check digit. Let the tool add it, or it will tell you the right one.
  • Cutting off the quiet zone. Scanners need white space at the sides.
  • Colored bars on colored backgrounds. Low contrast stops scanning.
  • Resizing out of proportion. Stretched bars can fail to scan.

Frequently Asked Questions

Choose the type, type the number and press Make barcode. Download it as PNG or SVG.

No. Leave it off and the tool adds it. If you type it, the tool checks it.

UPC-A has 12 digits; EAN-13 has 13. A UPC-A code is the same as an EAN-13 code that starts with 0.

Only with a number assigned to you by GS1. The tool draws the bars but does not register numbers.

SVG, because it stays sharp at any size.

One of the digits is likely mistyped. The tool shows the check digit the other digits need.

No. Barcodes are made in your browser.

Small packages that do not have room for a full EAN-13 barcode.

Not yet. This tool makes EAN-13, UPC-A and EAN-8.

Many phone apps and scanners can read a barcode on a bright screen, but a printed copy is the best test before you print labels.

References & Sources

SourceUsed ForLink
GS1, General Specifications EAN/UPC symbol structure and check digit rules. https://www.gs1.org/standards/barcodes-epcrfid-id-keys/gs1-general-specifications
GS1, How to calculate a check digit manually The 3 and 1 weighting method. https://www.gs1.org/services/how-calculate-check-digit-manually
Wikipedia, International Article Number L, G and R digit patterns and first-digit parity. https://en.wikipedia.org/wiki/International_Article_Number
Cite or share this calculator

DigitalCalculators.net. (2026, November 15). Barcode Generator. https://digitalcalculators.net/barcode-generator/