๐Ÿ“„
QR Tools Live

Barcode Generator (Code 128, EAN-13, UPC-A, Code 39)

For EAN-13, UPC-A and ITF-14: enter the digits without a check digit and this tool calculates it for you (12 digits for EAN-13, 11 for UPC-A, 13 for ITF-14). That makes the math correct, but it does not make the number yours — for retail sale you still need a manufacturer prefix assigned by GS1, or the code won't be recognized at checkout.

How to use the barcode generator

  1. Pick a format: Code 128 for general text or internal SKUs, EAN-13 or UPC-A for retail products, Code 39 for asset tags and older systems, ITF-14 for shipping cartons.
  2. Type or paste your data: letters and numbers for Code 128 and Code 39; digits only for EAN-13 (12 digits), UPC-A (11 digits), and ITF-14 (13 digits). The check digit is added automatically.
  3. Check the preview: the barcode renders instantly below the input as you type, including the human-readable number underneath the bars.
  4. Adjust size if needed: set bar width and height so the code stays readable at your print size, not just on screen.
  5. Download PNG or SVG: PNG for quick labels, SVG for anything going to a print shop or getting resized later.
  6. Print a test label first: scan it with the actual scanner you'll use in production before printing a full batch.

A barcode generator that covers the formats you'll actually run into

This barcode generator makes Code 128, EAN-13, UPC-A, Code 39, and ITF-14 barcodes directly in your browser using JsBarcode. Nothing you type gets uploaded anywhere, there's no signup, and the image renders as you type. The harder part isn't the tool, it's picking the right format and knowing what a barcode can and can't do for you. That's what this page covers.

What each barcode format is actually for

Code 128 is the flexible one: it encodes letters, numbers, and symbols, packs data densely, and is the default choice for warehouse labels, internal SKUs, shipping labels, and anything that isn't sold at a retail register. If you're not sure which format to use, Code 128 is usually it.

EAN-13 (13 digits) and UPC-A (12 digits) are the formats printed on products sold in stores: EAN-13 is the standard outside North America, UPC-A inside the US and Canada. Point-of-sale scanners are built around these two formats specifically.

Code 39 is older and less dense than Code 128, but it's still what a lot of legacy inventory systems, government forms, and physical asset tags expect. If your scanner or software was set up more than a decade ago, there's a decent chance it wants Code 39.

ITF-14 encodes 14 digits and is built for case and carton-level shipping, not individual items. It's the barcode printed on the outer box, distinct from the UPC or EAN on each unit inside.

The check digit problem: why a homemade retail barcode won't scan

Every EAN-13 and UPC-A barcode ends in a check digit, a number calculated from the digits before it that lets a scanner catch misreads. This tool calculates that check digit correctly for whatever number you enter, so the math checks out and the barcode will scan. What it cannot do is give you a number that's actually assigned to your product. Retail EAN-13 and UPC-A numbers come from GS1, the organization that licenses manufacturer prefixes so no two products in the world share a barcode. A number you invent yourself, even with a correct check digit, is not registered to you or your product. Print it and bring it to a real retail register, and one of two things happens: the scanner reads a code that belongs to someone else's item, or the retailer's system rejects it outright because it was never issued through GS1. If you're selling through Amazon, Walmart, or a physical retailer, budget for a GS1 company prefix (GS1 sets and publishes current pricing on their site; it varies by country and by how many numbers you need) before you print anything. If the barcode is for your own warehouse, inventory system, or asset tracking, none of this applies, use whatever numbers make sense to you internally.

Barcode vs. QR code: which one do you actually need

A traditional barcode (Code 128, EAN-13, UPC-A, Code 39) stores a short string, usually under 20-30 characters, as a single line of bars. Its advantage is compatibility: cheap laser scanners that have been in warehouses and checkout lanes for 30 years read it instantly, and it stays legible even smudged or slightly damaged. A QR code is a 2D grid that can hold thousands of characters, including full URLs, but it needs a camera-based scanner or smartphone, not the old laser-line kind. Use a barcode when you're plugging into an existing scanner infrastructure, retail POS, or inventory system that expects one. Use a QR code when you need to encode a link, more text than a barcode can hold, or you're relying on customers scanning with their phones.

Printing barcodes so they actually scan

Three things wreck barcode readability more than anything else. First, the quiet zone: leave blank margin (roughly 10x the width of the narrowest bar) on both sides of the code with nothing printed in it, including your label border. Second, minimum bar width: at small sizes, thin lines blur together on cheap printers; don't shrink a barcode below about 1 inch wide for Code 128 or Code 39 without testing it on your actual printer first. Third, paper finish: matte stock scans far more reliably than glossy, because glossy paper reflects the scanner's light source straight back and washes out the contrast the scanner depends on.

Worked example: labeling 200 SKUs for internal warehouse use

A small warehouse needs to label 200 SKUs for its own picking and inventory system, not for retail sale. Code 128 is the right call here: it's not going through a store register, so there's no GS1 requirement, and Code 128 handles the mixed letter-number SKU codes the warehouse already uses internally (like WH-2026-0143). Each label gets a 1.5 inch wide barcode printed on matte label stock with the default quiet zone left intact, and the crew scans a handful of test prints with the actual handheld scanner before running the full batch. Total cost: a roll of label stock and printer time, since the barcode generation itself is free and none of the 200 codes need to be registered anywhere.

Related tools

Need to encode a link, menu, or contact card instead of a short product code? Try the QR code generator. Generating many barcodes at once from a spreadsheet of SKUs is a different job than one-at-a-time entry, so batch that separately if your list is long.

Frequently Asked Questions

Is this barcode generator free to use?

Yes. It runs entirely in your browser using JsBarcode, so there's no upload, no signup, and no limit on how many you generate.

Can I use this to generate a valid UPC-A or EAN-13 barcode for retail?

You can generate a barcode with a correct check digit, but that's not the same as a legally sellable one. Retail UPC-A and EAN-13 numbers must be assigned to you through GS1; a self-made number, even with valid math, will either scan as someone else's product or get rejected at a store's register.

What's the difference between Code 128 and Code 39?

Code 128 is denser and supports the full alphanumeric range, making it the better default for modern warehouse and shipping labels. Code 39 is older and less compact but is still what many legacy scanners and inventory systems expect, so use it if your existing setup requires it.

Which barcode format should I use for shipping cartons?

ITF-14 is built for case and carton-level shipping, separate from the UPC or EAN-13 printed on each individual unit inside. If you're labeling a box of 24 units for a distributor, ITF-14 is the standard.

Does this barcode generator upload my data anywhere?

No. The barcode is drawn directly in your browser and nothing you type is sent to a server or stored.

What size should I print a barcode so it scans reliably?

Keep it at least about 1 inch wide for Code 128 or Code 39, leave a blank quiet-zone margin on both sides, and print on matte rather than glossy paper to avoid glare washing out the contrast a scanner needs.

Should I use a barcode generator or a QR code generator for my product?

Use a barcode if you're feeding an existing laser scanner or retail POS system that expects one. Use a QR code if you need to store a link or more text than a barcode's short digit or character limit allows, and scanning will happen with smartphones.