Barcode Generator

Retail and inventory barcodes with automatic check digits — generated in your browser, never uploaded.

Enter the first 12 digits of the EAN. Enter all 13 and the check digit is verified instead.

Size preset

Label

Colors

#111111
#ffffff
Safe picks:

Output

Your barcode will appear here
Link copied — opening it restores this exact barcode and settings

Advertisement
Advertisement

How it works

Type a number and the page encodes it with its own implementations of the retail standards — EAN-13 and EAN-8 (ISO/IEC 15420), UPC-A, and Code 128 subset B (ISO/IEC 15417). The check digit is computed for you as you type, because a wrong final digit makes a barcode unreadable to a till that checks it. ISBNs are accepted in both 10- and 13-digit form and converted to the EAN the scanner actually reads.

Every colour choice runs through a scan-safety check before you print. Laser scanners read barcodes in red light, so the check looks at the red channel specifically: red bars on white are effectively invisible to a till even though they look fine on screen. Contrast is also graded against the WCAG formula, and an inverted code — light bars on dark — is flagged as a failure outright.

The bars are generated as exact module widths, so the SVG export keeps the proportions the standards define. The quiet zone on each side is part of the export on purpose: trimming it is a common reason a printed barcode fails.

How the colour check decides

The check makes two measurements. The red-light gap is the background's red value minus the bars' red value, out of 255: a rough stand-in for how dark the bars look under a red laser. Contrast is the WCAG ratio used for readable text. These are the page's own verdicts on some common pairs:

ColoursRed-light gapContrastVerdict
Black on white25521.0:1Safe
Navy on white22510.4:1Safe
Dark green on white2337.1:1Safe
Navy on light blue1617.3:1Safe
Mid grey on white1484.8:1Marginal
Dark red on white706.5:1Fails
Red on white354.8:1Fails
White on black−25521.0:1Fails (inverted)

A red-light gap under 100 fails; 100 to 149 is marginal, fine for phone cameras but worth testing at a real till. Contrast under 2.5:1 fails and under 4:1 is a warning. Light bars on a dark background fail whatever the numbers, because scanners look for dark bars.

Dark red is the row to remember. At 6.5:1 it passes the contrast test for readable text, yet in red light its bars are almost as bright as the paper. The check is a guide, not a guarantee: print one label and scan it at the till that will read it before printing the run. Barcodes for a small shop covers the rest of the print checklist.

Barcode questions

Which barcode types can I generate?

EAN-13 and EAN-8 for retail products worldwide, UPC-A for North America, Code 128 for shipping and inventory labels, and ISBN for books. ISBN-10 numbers are converted to the 978 EAN-13 automatically.

Is the check digit calculated for me?

Yes. Enter the first digits and the check digit is computed automatically; enter the full number and it is verified instead, with the correct value shown if there is a typo.

Will my barcode scan at a retail till?

Yes, when printed correctly. The colour check runs live — retail lasers read with red light, so red or low-contrast bars are flagged before you download. Quiet zones are part of every export, and the size presets include 100% EAN nominal.

Is my product data uploaded anywhere?

No. Barcodes are generated entirely in your browser by our own encoder. Numbers you enter never leave your device.

Should I print PNG or SVG?

SVG for anything printed — bars stay mathematically exact at any size, which matters because readers measure bar widths. PNG is fine for screens and documents.

Why can't the bars be red?

Laser tills read barcodes in red light. Red bars reflect that light exactly like the white background does, so to the scanner the code is blank — even though it looks perfectly crisp on screen. The safety check on this page measures the red channel specifically and will warn you before you print.