Barcode Generator
Real, scannable barcodes — Code 128 and EAN-13 — with correct checksums, quiet zones, and PNG/SVG downloads. All in your browser.
Any printable text (letters, digits, punctuation). Long digit runs are automatically packed with subset C.
Enter 12 digits and we'll compute the check digit — or 13 digits and we'll validate it.
How to use the Barcode Generator
Two symbologies cover nearly every barcode you'll ever need — pick the right one and the tool handles the fiddly checksum math.
- Pick a tab. Code 128 for labels, inventory, tickets, and anything internal; EAN-13 only for retail products with GS1-registered numbers.
- Type your data. Code 128 takes any printable text; EAN-13 takes 12 digits (check digit computed) or a full 13 (validated).
- Check the anatomy line under the preview — it shows the subset path and checksum for Code 128, or the computed check digit for EAN-13.
- Download PNG for print and documents, or SVG for infinitely scalable vector artwork (packaging, signage).
Code 128 vs EAN-13 — which one?
EAN-13 is a fixed 13-digit format governed by GS1; point-of-sale systems expect real registered numbers, so don't invent one for a product you plan to sell. Code 128 is the workhorse for everything else: serial numbers, asset tags, library books, event tickets. It encodes the full printable ASCII set and compresses digit runs automatically — a 10-digit number takes roughly half the width it would as plain text.
Making barcodes that actually scan
Three rules: quiet zones (the blank margins — this tool draws them, never crop them), contrast (dark bars, light background, no red-on-white — red looks white to laser scanners), and scale (print at 100%; "fit to page" shrinking narrows the bars past what cheap scanners resolve). Test-scan with your phone before printing a thousand labels.
- What is a Code 128 barcode?
- Code 128 is a high-density barcode symbology that can encode all 128 ASCII characters. It uses three subsets — A (control characters), B (text), and C (pairs of digits) — and always ends with a mod-103 check symbol so scanners can verify the data. It's the standard choice for shipping, inventory, and asset labels.
- What is an EAN-13 barcode?
- EAN-13 is the 13-digit barcode printed on retail products worldwide. The first digits identify the country of origin, the middle digits identify the manufacturer and product, and the final digit is a check digit computed from the other twelve. Type the first 12 digits here and the tool computes the check digit for you.
- How is the EAN-13 check digit calculated?
- Starting from the left, the digits in odd positions are multiplied by 1 and the digits in even positions by 3. Add them up, take the remainder when divided by 10, and subtract from 10 (if the remainder is 0, the check digit is 0). For example, 590123412345 gives a check digit of 7.
- Will these barcodes actually scan?
- Yes — they use the real symbology rules: correct start/stop patterns, valid checksums, and quiet zones. For best results, print at 100% scale (no 'fit to page' shrinking) with dark bars on a light background, or scan directly from a bright screen.
- What is a quiet zone and why does it matter?
- The quiet zone is the blank margin on each side of a barcode — at least 10 bar-widths for Code 128. Scanners need it to tell where the symbol starts and ends. This tool always draws quiet zones; never crop them off.
- Should I use Code 128 or EAN-13?
- Use EAN-13 only for retail products sold in stores — its number ranges are assigned by GS1 and cash registers expect them. For everything else (inventory, tickets, labels, internal tracking), use Code 128: it holds any text and is more compact.
- Is my barcode data sent anywhere?
- No. Barcodes are rendered entirely in your browser with JavaScript. Nothing is uploaded, stored, or tracked.
Kept alive by readers like you
Every tool in the codex is free. If they save you time, a small donation inscribes new pages.
DonateNeed help with this tool?
Found a bug, or have a suggestion for the codex? Write to us — a real human reads every message.
[email protected]More from the codex
Barcode Generator
Scannable Code 128 and EAN-13 barcodes with PNG/SVG downloads.
Base32 Encoder
RFC 4648 Base32 encode and decode, unicode-safe.
Open tool → LiveAnagram Solver
Find every anagram hiding in your letters.
Open tool → LiveAcronym Generator
Turn phrases into acronyms — and acronyms into ideas.
Open tool → LiveBase64 Encoder
Encode and decode Base64 text, unicode-safe.
Open tool → LiveCipher Lab
Caesar, Vigenère, and Atbash ciphers in your browser.
Open tool → LiveASCII Table
Every character code at a glance.
Open tool → LiveCase Converter
UPPER, lower, Title Case and more.
Open tool →