Barcode generator
Pick a format, type the data, download the bars as PNG or SVG. Check digits are validated before you print five hundred labels wrong.
Guide
How to use it
- Choose the format. Code 128 for internal labels and any text, EAN-13 or UPC-A only for genuine retail codes.
- Type the data. Retail formats validate the check digit live and tell you the correct final digit if yours fails.
- Toggle the digits under the bars, on for humans, off if your label template prints them separately.
- Download SVG for print (scales forever) or PNG for documents and screens.
Examples
Format facts
Encodes letters, digits and symbols compactly, the workhorse for asset tags, shelf labels and shipping references. "STORE-A-0042" is a perfectly good Code 128.
The 13-digit retail code on almost everything sold in Europe. The digits are assigned by GS1, generating a barcode for a number does not make the number yours.
The 12-digit US retail equivalent. Same check digit maths as EAN, one digit shorter, scanners worldwide read both.
Method
How it works
Bars are rendered as SVG by the open-source JsBarcode library on your device, PNG downloads rasterise that SVG at triple resolution for crisp printing. For EAN and UPC the check digit is verified with the standard modulo-10 weighting before anything renders, a wrong final digit is caught with the correction shown.
Print sizing guidance: EAN-13 at nominal size is 37.3 mm wide, scanners tolerate 80% to 200% of that. SVG output scales to any of those sizes without degrading.
FAQ
Frequently asked questions
Can I invent an EAN-13 for my product?
You can generate the barcode, but retail numbers are issued by GS1, an invented number will collide with someone else’s product in any real till system. For internal-only labelling, use Code 128 and any scheme you like.
What is the check digit?
The last digit, computed from the others with alternating 1 and 3 weights. Scanners use it to reject misreads, this tool uses it to reject typos.
PNG or SVG for printing?
SVG. It scales to any label size with mathematically sharp edges. Use PNG where SVG is not accepted, it is generated at 3× resolution here for that reason.
Why will my barcode not scan?
Usually size or contrast: too small, printed in a pale colour, or on glossy curved plastic. Black on white at 100% nominal size scans every time.
Do I need quiet zones?
Yes, the blank margins either side are part of the spec and included in the output. Do not crop them off in your label software.
Is the data sent anywhere?
No, rendering happens in your browser. What you encode stays with you.
More tools