Every product on a store shelf, every courier parcel, and every library book you've ever borrowed has been tracked by a small pattern of black-and-white lines. Barcodes are one of the oldest pieces of everyday "technology" most people never think about — yet picking the wrong format, or generating one incorrectly, is a surprisingly common way small projects run into trouble. This guide walks through what barcodes actually encode, which format fits which job, and how to generate a clean, scannable one for free using EkZapp's Barcode Generator.
Whether you're a small business owner labeling your first batch of products, a warehouse manager trying to speed up manual stock counts, or a developer who just needs a quick CODE128 for a prototype, the underlying decisions are the same: pick the right format, get the data right, and print it so it actually scans. Get any one of those three wrong, and the barcode either fails at checkout or, worse, silently reads back the wrong information.
What Is a Barcode, Really?
A barcode is a visual encoding of data — usually a number, sometimes letters too — as a pattern of parallel bars of varying width. A scanner shines light across the pattern and reads the reflected pulses back as the original string of characters. It's a much older idea than QR codes: the first retail barcode scan happened on a pack of chewing gum in 1974, and the core system has barely changed since.
What has changed is how many different barcode "languages" now exist, each suited to a different job. That variety is exactly where most confusion starts — a courier tracking number and a supermarket price tag don't use the same format, and mixing them up is the single biggest reason a freshly generated barcode won't scan.
It helps to think of a barcode format the way you'd think of a file format: CODE128 is closer to a flexible, general-purpose format like CSV, while EAN-13 is closer to a rigid, standardized format like a bank account number — fixed length, fixed structure, and a built-in check to catch typos.
Barcode Formats Explained
Here are the formats you'll actually run into in practice:
- CODE128 — the most flexible format. Encodes letters, numbers, and many symbols in a variable length. The default choice for shipping labels, internal SKUs, and event tickets.
- EAN-13 — the global retail standard outside North America. Always exactly 13 digits, the last of which is a checksum.
- EAN-8 — a shorter version of EAN-13 for small packaging where a full 13-digit barcode won't physically fit.
- UPC-A — the North American equivalent of EAN-13, 12 digits.
- UPC-E — a compressed 6-8 digit version of UPC-A for very small labels.
- CODE39 — an older alphanumeric format, still common in automotive and defense industries and for ID badges, because it's easy to print without special equipment.
- ITF-14 — 14 digits, used almost exclusively on shipping cartons and case-level packaging rather than individual items.
- MSI — a numeric format mostly seen on warehouse shelf-edge labels.
- Pharmacode — a simple format used in pharmaceutical packaging as a print-quality check, not a product identifier.
Which Format Should You Use?
| Your situation | Recommended format |
|---|---|
| Selling a product through retail stores | EAN-13 (or UPC-A in the US/Canada) |
| Internal stock tracking or SKU labels | CODE128 |
| Shipping cartons or pallets | ITF-14 |
| Courier tracking numbers | CODE128 |
| Asset tags, ID badges, older POS systems | CODE39 |
| Very small product packaging | EAN-8 or UPC-E |
If you're not selling through a retail checkout system at all, there's rarely a reason to use EAN-13 or UPC-A — CODE128 is simpler, doesn't require registration with anyone, and can encode more information if you ever need it.
How Barcode Checksums Work
EAN-13, UPC-A, and ITF-14 all end in a checksum digit — a number mathematically derived from all the digits before it. When a scanner reads the barcode, it recalculates the checksum from the first digits and compares it to the last one; if they don't match, the scan is rejected rather than silently returning wrong data.
Worked example: EAN-13 checksum
Take the first 12 digits: 890123456789. Multiply alternating digits by 1 and 3 starting from the left, sum the results, and find how far that sum is from the next multiple of 10 — that gap is the checksum digit. For this example the calculated checksum is 6, giving the full code 8901234567896. A good barcode generator calculates this automatically, so you never have to do the arithmetic by hand.
This is also why a generator should reject a 13-digit EAN-13 input with an invalid checksum, or better, calculate the correct one for you from just the first 12 digits — which is exactly what EkZapp's tool does.
Worked example: UPC-A checksum
UPC-A follows the same idea with 11 digits plus a checksum. Take 03600029145: multiply the odd-position digits by 3, add the even-position digits as-is, sum everything, and the checksum is whatever brings that total to the next multiple of 10. Here that works out to 2, giving the full 12-digit code 036000291452. Get one digit wrong anywhere in the sequence and the checksum almost always changes too, which is exactly the point — it catches transcription errors before they reach a customer.
What Kind of Scanner Reads These?
Most barcode formats are readable by three broad categories of device, though not always equally well:
- Laser scanners — the classic handheld or countertop scanners used at retail checkouts. Fast and reliable for 1D formats like EAN-13, UPC-A, and CODE128, but they can't read 2D codes like QR.
- Camera-based (imager) scanners — modern handheld scanners and most phone scanning apps. Can read both 1D barcodes and 2D codes, and are generally more forgiving of print quality and angle.
- Smartphone apps — free barcode-scanning apps use the phone camera the same way an imager scanner does. Good enough for testing a print run, though usually slower than dedicated hardware for high-volume use.
If you're building something for a warehouse or a checkout counter, it's worth testing with the actual scanner model that will be used in production rather than just a phone app — contrast, lighting, and print resolution requirements can vary meaningfully between devices.
Step-by-Step: Generating a Barcode Online
- Open the Barcode Generator — no signup required.
- Type the number or text you want encoded into the data field.
- Pick the format that matches your use case from the table above.
- Adjust bar width, height, margin, and color to fit the label size you're printing to — the preview updates live as you type.
- Download as PNG for quick digital use, or SVG if you're sending the file to a professional printer.
Printing Barcodes That Actually Scan
A barcode that looks fine on screen can still fail to scan once printed. A few things matter more than they seem:
Keep the quiet zone
The blank margin on either side of the bars isn't wasted space — scanners use it to know where the code starts and ends. Cropping it too tight is one of the most common causes of a "no read."
Don't stretch unevenly
If you resize the image after export, scale width and height together. Stretching only horizontally or only vertically distorts the bar-width ratios the scanner depends on.
Print at real size
Use the SVG export for anything going to a professional printer — it stays crisp at any size, unlike a PNG that gets blurry when scaled up.
Test before a full print run
Scan a single printed copy with a phone barcode-scanning app before committing to hundreds of labels.
Common Mistakes to Avoid
- Using EAN-13/UPC-A without a real GS1 number for products actually sold at retail — the barcode will physically scan, but it may not correctly identify your product in the retailer's system.
- Mixing up CODE39 and CODE128 — CODE39 can't reliably encode lowercase letters or certain symbols the way CODE128 can.
- Ignoring the checksum digit when manually typing an existing EAN/UPC number rather than letting the generator calculate it.
- Printing too small — most formats have a practical minimum size below which consumer scanners start struggling.
- Using low-contrast colors — dark bars need to sit on a light, plain background; colored or textured backgrounds behind the code are a common cause of failed scans.
- Reusing the same number across products — treating barcode numbers as decorative rather than as unique identifiers defeats the entire purpose of using them for inventory or POS lookups.
Do You Need a Real GS1 Number?
If you're only using barcodes for internal tracking, event check-in, asset tags, or design mockups, no — any number works, and CODE128 is the simplest choice. But if you intend to sell a product through external retail stores or major e-commerce marketplaces, the product needs a barcode number properly issued through GS1, the global standards body that allocates company prefixes for EAN/UPC codes. A self-generated EAN-13 number that happens to have a valid checksum will still scan, but it isn't guaranteed to be unique — it could collide with another company's real registered product.
For businesses in India, barcode numbers are issued through GS1 India, the local affiliate of the same global system. Registration involves membership fees and documentation requirements that GS1 India updates from time to time, so check their official site directly for the current process, pricing, and how many barcodes your registration tier entitles you to — don't rely on a fixed figure from any third-party article, including this one. Many marketplaces that require a GTIN (Global Trade Item Number) — the umbrella term covering EAN-13, UPC-A, and similar codes — will specifically check that the prefix traces back to a real GS1 registration, so it's worth applying before listing products rather than after.
Until that registration comes through, this tool is still useful for mocking up exactly how the final packaging will look, testing your label printer's output quality, or generating placeholder codes for a staging environment — you simply swap in the real GTIN once it's issued.
Barcodes Beyond Retail Products
It's easy to associate barcodes only with supermarket checkouts, but they show up in far more everyday systems once you start looking. Libraries use CODE128 on membership cards and book spines to speed up checkout and returns. Hospitals use barcodes on patient wristbands and medication packaging as a safety check against giving the wrong drug to the wrong patient. Event organizers print CODE128 or CODE39 on tickets so a single handheld scanner can validate entry far faster than checking names against a list by hand. Courier and logistics companies rely almost entirely on CODE128 for the long alphanumeric tracking numbers printed on shipping labels, precisely because it isn't limited to digits the way EAN-13 or UPC-A are.
The common thread across all of these is the same one that applies to a small shop's own SKU system: you don't need a globally registered number to get real value from a barcode. You only need one when the code has to be understood correctly by a system outside your own control, like a retail partner's checkout software. For everything else — your own shelves, your own tickets, your own tracking numbers — any generator that produces a correctly formatted, scannable code is enough, and that's exactly the gap EkZapp's Barcode Generator is built to fill.
Published July 28, 2026 · Last updated July 28, 2026