Product Barcode Generator (UPC, EAN & Code 128)

Use the generator below to turn a product number you already own into a scannable retail barcode. Pick UPC-A, EAN-13, EAN-8 or Code 128, type the digits, and the preview updates instantly with the check digit validated — then export SVG for the print shop or PNG for a listing mock-up. Everything renders in your browser, so product data never leaves your device. One thing no tool can do for you: the number itself. Retail barcode numbers are issued by GS1 against your company prefix, and this page explains how to get barcodes for your products as well as how to generate and print them correctly.

Loading tool…

What you get

UPC-A, EAN-13, EAN-8 and Code 128 for retail packs, cases and internal SKUs

Live check-digit and digit-count validation before anything reaches a print run

Vector SVG export so bars stay sharp at any label size, plus PNG and PDF

Adjustable bar height, module width, margin and human-readable text

Runs entirely in your browser — product numbers never leave the device

How to generate a product barcode step by step

Step 1 — choose the symbology that matches where the product will be scanned. UPC-A for North American retail, EAN-13 for most other markets, EAN-8 for very small packs, Code 128 for internal SKUs and carton labels.

Step 2 — enter the number. For EAN-13 you can enter the first twelve digits and let the tool compute the thirteenth check digit, or paste all thirteen and confirm it is accepted. A rejected number almost always means a transposed digit upstream in your product spreadsheet, not a bug in the barcode.

Step 3 — set the size. Match the bar height and module width to the label you are actually printing, and leave the margin generous so the quiet zone on each side survives trimming.

Step 4 — export. SVG for anything going to a printer or into packaging artwork, PDF when the print shop asks for one, PNG only for on-screen mock-ups and marketplace previews.

Step 5 — proof it. Print one label on the real substrate at final size and scan it before committing to a production run.

How to get barcodes for your products in the first place

A generator draws a symbol; it does not allocate a number. To sell through mainstream retail or most major marketplaces you need a GTIN — a globally unique product number — obtained by joining your national GS1 member organisation, which issues a company prefix. You then assign item numbers within that prefix yourself: one per sellable variant, so a 250 g and a 500 g bag of the same coffee need different numbers.

GS1 licensing is a paid annual arrangement scaled to how many numbers you need, and marketplaces increasingly verify that a GTIN resolves to your brand. Resold or 'lifetime' barcode numbers bought cheaply from third parties usually trace back to another company's prefix, which is why listings using them get suspended. If your barcodes will only ever be scanned inside your own operation — stockroom, workshop, asset tags — you do not need GS1 at all: invent your own scheme and encode it as Code 128.

Once the numbers exist, keep them in a single master spreadsheet with SKU, variant and GTIN in one row each, and generate barcodes from that sheet rather than retyping numbers. Most barcode errors small brands hit are data-entry errors, not printing errors.

UPC vs EAN vs Code 128 — which product barcode do you need?

EAN-13 is the default for products sold outside North America, and UPC-A covers the same job in the United States and Canada; both encode a GS1-issued number that identifies the brand owner and the specific item. Modern retail scanners read both, so the choice usually follows whichever number your GS1 member organisation issued you rather than a design preference.

EAN-8 exists for packaging too small to carry a full thirteen-digit symbol — a lip balm, a single-serve sachet, a small tin. It needs its own separately allocated short number rather than a trimmed version of an EAN-13, so request one instead of shortening what you have.

Code 128 is the right choice when the barcode is not passing a retail checkout: internal SKUs, case and carton labels, fulfilment identifiers. It accepts letters as well as digits and packs them densely, which is why fulfilment centres prefer it for outer cartons while the consumer unit keeps its EAN or UPC.

Why the check digit matters more than the artwork

The final digit of an EAN or UPC is arithmetic, not decoration: it is derived from the preceding digits, and a scanner recalculates it on every read. If the recalculated value does not match what is printed, the scan is rejected outright — which is why a barcode that looks perfect can still fail at the till after a single typo three digits earlier.

The generator checks this for you as you type, so treat a validation warning as a signal to go back to your source data. When you have dozens of SKUs to produce, generate them in one sitting straight from the master list and proof each symbol against that list before anything reaches a plate.

Common mistakes and troubleshooting

Scanner beeps but the till says unknown item — the symbol is fine and the number is fine; the GTIN simply is not in the retailer's product file yet. That is a data submission task with the retailer, not a barcode task.

Nothing reads at all — check the quiet zone first, then contrast, then size. A barcode with artwork pressed against its left or right edge fails far more often than an undersized one.

It scans on a phone but not at the checkout — phone cameras are far more forgiving than a fixed laser. Always validate on real hardware before a production run; a phone scan is a smoke test, not sign-off.

The check digit will not validate — you have twelve digits where thirteen are needed, or a leading zero was eaten by a spreadsheet. Format the GTIN column as text before you export.

Every variant shares a number — each sellable variant needs its own GTIN. Same product, different size or colour, different number.

The printed label looks fuzzy — a raster image was scaled up. Export SVG and let the print workflow scale the vector instead.

Testing and scanning before a production run

Print a single label on the exact substrate and finish you will use in production, not on office paper. Laminate or varnish it the same way, then scan it with a real handheld or checkout scanner at a normal distance and an off-angle. If you have no scanner to hand, scan with two different phones as a first pass and treat any hesitation as a fail.

For a multi-SKU run, spot-check the first, a middle and the last symbol against your master spreadsheet, reading the human-readable digits under the bars rather than trusting the file name. Keep the approved artwork and the spreadsheet row together so a reprint six months later starts from a known-good source.

Practical examples from small product brands

A coffee roaster with eight blends allocated a GS1 prefix, generated eight EAN-13 symbols, and dropped each SVG into the existing bag artwork template — no repositioning needed, because the vector scaled cleanly into the reserved panel. A candle maker selling through a regional grocery chain used EAN-8 on small tins and EAN-13 on boxed gift sets, since the chain's checkout accepts both.

A homeware brand shipping into a marketplace warehouse kept its retail EAN on the unit and printed a separate Code 128 label carrying the marketplace's own item identifier on the outer carton, which is the arrangement most fulfilment centres expect.

A short checklist before committing to a print run

Confirm every number came from your own GS1 allocation, confirm the check digit validates in the preview above, confirm the symbol is at or near nominal size with clear quiet zones, print one label on the real substrate, and scan it with a real scanner. Only then send the artwork to production.

Advertisement

Create Your QR Code

Frequently Asked Questions

Can this tool assign me a product barcode number?

No — UPC and EAN numbers are allocated by GS1 against your company prefix. QRPixel converts a number you already own into a scannable symbol; it cannot issue or reserve numbers for you.

How do I get barcodes for products I want to sell in shops?

Join your national GS1 member organisation, which licenses you a company prefix, then assign one item number per sellable variant within that prefix and generate the symbol here. Avoid cheap resold numbers — they usually belong to another company's prefix and get listings suspended.

Should I use EAN-13 or UPC-A for my product?

Use UPC-A if your primary market is the United States or Canada and EAN-13 elsewhere. Modern retail scanners read both, so in practice the choice follows whichever number your GS1 member organisation issued.

What if my packaging is too small for a full barcode?

Move to EAN-8, which is designed for small packs, rather than scaling an EAN-13 below its permitted magnification. EAN-8 numbers are allocated separately, so request one rather than shortening an existing code.

Which file format should I send to a printer?

SVG. It is a vector, so bar edges stay crisp at any size and the print shop can place it without resampling. PDF works when they ask for it; PNG is only appropriate for on-screen mock-ups and listing images.

Why does my barcode scan on a phone but fail at the checkout?

Phone cameras tolerate low contrast, small sizes and tight quiet zones that a fixed-position checkout laser will not. Check magnification, quiet zone and bar colour, then re-test on real scanning hardware before printing at volume.

Do I need a different barcode for each product variant?

Yes. Every sellable variant — each size, flavour, colour or multipack — needs its own GTIN, because retail systems price and count against that number.

Is my product data uploaded anywhere?

No. Barcode rendering happens entirely in your browser, so the numbers you type stay on your device and nothing is transmitted to a server.

Related pages and guides