Barcode Generator
Generate a scannable 1D barcode — EAN-13, EAN-8, UPC-A or Code 128 — as a crisp, scalable SVG with a correctly computed check digit. Runs entirely in your browser.
Input
EAN-13: 12 digits (13 with check digit) · UPC-A: 11 digits (12 with check digit) · EAN-8: 7 digits (8 with check digit) · Code 128: any printable ASCII text. The check digit is computed for you — include it to have it verified.
Output
Your barcode will appear here.
Guides
A barcode generator that turns a number or short piece of text into a scannable 1D (linear) barcode — EAN-13, EAN-8, UPC-A or Code 128 — rendered as a crisp, infinitely scalable SVG. Everything runs in your browser: your data never leaves the page.
How to use it
- Pick a Format. EAN-13 and UPC-A are the codes on retail products worldwide (UPC-A is the US/Canada variant, EAN-13 the international one); EAN-8 is the compact version used on small packaging; Code 128 encodes any printable text — letters, numbers and punctuation — and is common on shipping labels, tickets and internal SKUs.
- Type your Barcode Data. For EAN-13/EAN-8/UPC-A you can enter either the full number (with a check digit already on the end) or just the payload without it — the tool computes the correct check digit for you either way, and tells you immediately if a check digit you typed doesn't match.
- Toggle Show human-readable text to print the digits/text beneath the bars, and pick a bar and background colour if you need something other than plain black-on-white.
- Copy the SVG markup directly, or download the
.svgfile — it stays sharp at any print size, from a shelf label to a full-page poster.
Check digits, done correctly
EAN-13, EAN-8 and UPC-A all use the same GS1 mod-10 checksum, but it's easy to get subtly wrong: the weighting (3× or 1×) depends on how far a digit sits from the check digit, not on its raw position in the string — get that backwards and an 11-digit UPC-A payload silently produces the wrong check digit while a 12-digit EAN-13 payload happens to still work. This tool computes the weight from distance-to-check-digit for every format, and the result was cross-checked against real, independently published barcodes: EAN-13 4006381333931 and UPC-A 036000291452 (the barcode printed on a pack of Wrigley's gum) both compute the correct, expected check digit.
Format cheat sheet
| Format | Payload length | With check digit | Typical use |
|---|---|---|---|
| EAN-13 | 12 digits | 13 digits | Retail products (international) |
| UPC-A | 11 digits | 12 digits | Retail products (US/Canada) |
| EAN-8 | 7 digits | 8 digits | Small packaging |
| Code 128 | 1–80 characters | — (checksum isn't printed) | Shipping, logistics, internal codes |
Will this barcode actually scan?
Yes — the bar widths follow the same published encoding tables (GS1 General Specifications for EAN/UPC, the ISO/IEC 15417 symbol table for Code 128) that every commercial barcode generator uses, not an approximation. Print it at a size where the narrowest bar is at least about 0.25mm wide and any standard barcode scanner or phone camera app will read it.
Why doesn't Code 128 show a checksum digit?
Code 128's checksum is a modulo-103 value baked into the bar pattern itself for error detection — it isn't one of the 103 printable values a human would read, so unlike EAN/UPC it's never printed as a visible digit underneath the bars.
Can I use this for ISBNs?
Yes — an ISBN-13 is a valid EAN-13 (ISBNs use the same 978/979 prefix range), so pasting a 13-digit ISBN into EAN-13 mode produces the exact barcode printed on the back of the book.