Barcode Generator — EAN, UPC & Code 128

Make scannable barcodes for products, inventory, shipping and libraries — check digits are calculated for you, and you can download a sharp SVG for print or a PNG for documents.

Runs in your browserUpdated

Your data never leaves your computer. All processing happens 100% locally in your browser.

How to use the Barcode Generator

  1. Choose the barcode type — EAN-13 or UPC-A for retail products, Code 128 for anything else.
  2. Type your number or text. For EAN and UPC you can leave out the last (check) digit; it is calculated for you.
  3. Adjust size and colors, then download an SVG for print or a PNG for documents and labels.

Which barcode should I use?

  • EAN-13 — the 13-digit retail barcode used worldwide. The first digits are a GS1 company prefix.
  • UPC-A — the 12-digit retail barcode used in the US and Canada; scanners everywhere read it.
  • EAN-8 — a short 8-digit retail code for very small packages.
  • Code 128 — encodes any text, digits and punctuation compactly. Used for shipping labels, inventory and asset tags. The generator switches to the dense numeric mode automatically for long runs of digits.
  • Code 39 — uppercase letters, digits and a few symbols. Older but simple; common for ID badges and industrial labels.

Check digits are added for you

EAN and UPC codes end with a check digit calculated from the others (alternating weights of 1 and 3, modulo 10), so a scanner can detect a misread. Enter 12 digits for EAN-13 (or 11 for UPC-A, 7 for EAN-8) and the last digit is added. If you enter the full number, the generator verifies the check digit and tells you if it is wrong.

Do I need to register product barcodes?

For selling in shops and on marketplaces like Amazon, yes — retail EAN/UPC numbers must come from GS1, the organisation that licenses company prefixes, so your number is unique worldwide. For internal uses — inventory, libraries, assets, events — any number works, and Code 128 is the usual choice.

Printing tips

Use the SVG download for print: it stays perfectly sharp at any size. Keep dark bars on a light background with good contrast, leave the white margin (quiet zone) on both sides, and don’t print EAN/UPC much smaller than about 80% of nominal size (37 × 26 mm for EAN-13).

Tools that pair well with the Barcode Generator

  • QR Code Scanner — Point your camera at a QR code, or drop an image or screenshot that contains one.
  • SVG to PNG Converter — Render SVG vector graphics as crisp PNG images at exactly the size you need — for app stores, social media, email or documents.
  • Image Converter — Convert any image your browser can open — PNG, JPG, WebP, AVIF, GIF, BMP or SVG — into PNG, JPG, WebP or AVIF, one file or hundreds at a time.
  • UUID Generator — Create cryptographically random UUIDs (v4) or sortable, timestamp-based UUIDs (v7) in bulk, then copy or download them.

Frequently asked questions

Are the barcodes free to use commercially?
Yes. The images you create are yours, with no watermark or attribution. For retail products, the number itself must be licensed from GS1 — the barcode image is the easy part.
Why is my EAN-13 or UPC-A rejected?
EAN-13 needs 12 or 13 digits and UPC-A 11 or 12. If you type the full number, the last digit must be the correct check digit — the message under the barcode shows which digit is expected.
Which format is best for printing labels?
SVG. It is a vector image, so it stays crisp at any size in Word, Illustrator, label printers and web pages. PNG is fine for screens and quick documents.
Can a barcode hold a URL?
Code 128 can, but phones read QR codes much more easily. For links, use the QR Code Generator.
Can I install Barcode Generator as a web app and use it offline?
Yes. Barcode Generator is an installable web app (PWA) — installed from your browser, not downloaded from an app store. Click Install app at the top of this page in Chrome or Edge (Windows, macOS, Linux, ChromeOS) or on Android, use Share → Add to Home Screen on iPhone and iPad, or File → Add to Dock in Safari 17+ on a Mac. It then opens in its own window with its own icon, and because it runs entirely in your browser it keeps working offline. Firefox on desktop can’t install web apps. How installing works.

Related tools