Practical Guide · 2026

Barcode Generator Guide: ISBN, UPC & Bulk
Types, Sizes, GS1 & What Scans

Which symbology to pick, how small it can legally go, why a label scans on your phone but fails at the till, and where a free generator stops and GS1 begins. Includes a minimum-size calculator and a check-digit calculator.

Karan Kumar · Updated Nov 2026 · ~16 min read
What this guide covers

1 What a barcode generator does — and what it cannot do

It converts a number or string you already own into a scannable image. It does not issue that number.

You paste a GTIN, SKU, serial or asset tag, choose a symbology, and export PNG or SVG. The bars are a drawing of that string. A scanner decodes the pattern and returns exactly the characters you typed — no lookup, no database, no product record attached.

That distinction decides most buying mistakes. A generator does three things and not one more: it validates length and character set, it calculates the check digit where the standard requires one, and it renders the module pattern. It cannot allocate a GTIN, it cannot tell you whether a number already belongs to another company, and it cannot register your product with a retailer or marketplace. Those steps are separate, and they are the ones that cost money.

This page covers 1D linear symbols only — Code 128, EAN-13, UPC-A, EAN-8, ITF-14 and Code 39. Two-dimensional symbols (QR, Data Matrix, PDF417) behave differently; the QR Code guide covers those.

The one-minute decision

Selling through a checkout counter or a marketplace? You need a GS1-issued number first, then a generator to draw it. Tracking your own stock, assets or shipments? Code 128 and any numbering scheme you like.

2 How encoding works

Four stages from typed data to downloadable image. Knowing them helps when a scan fails.

1

Data input

You enter digits or text. The tool checks that the data matches the chosen type (for example EAN-13 must be numeric and the right length).

Barcode Generator with the data input field pre-filled with AFFLIGO
2

Encoding

Each character becomes a fixed pattern of modules (narrow/wide bars and spaces). Check digits are calculated where the standard requires them.

Barcode type selector highlighted with Code 128, EAN-13 and UPC-A options
3

Pattern assembly

Start and stop patterns, data, check digit and quiet zones (blank margins) are combined into one continuous symbol. Adjust bar height, width, and show/hide the text label under the bars as needed.

Generated barcode preview with height slider and width controls highlighted
4

Render and download

The pattern is drawn to PNG or SVG. Optional human-readable text sits under the bars. The AFFLIGO Barcode Generator runs this in the browser so your data stays on the device. Always test-scan the first print before committing to a large run.

Download PNG and Download SVG buttons highlighted on the action bar

3 Check digit — the arithmetic, worked out

Every retail number ends in a digit calculated from the others. Get it wrong and the till rejects the scan before your system ever sees it.

A check digit is computed once when the number is assigned and again every time it is scanned. The reader recalculates it from the decoded bars. If the two disagree, the whole read is thrown away — which is how a single smudged bar becomes “invalid barcode” instead of the wrong price at the till.

EAN-13 and UPC-A both use weighted modulo-10, but with opposite weight order. EAN-13 weights the first digit 1; UPC-A weights it 3. That one detail is why a UPC check digit pasted into an EAN field always fails.

StepEAN-13 exampleUPC-A example
Base digits4 0 0 6 3 8 1 3 3 3 9 30 3 6 0 0 0 2 9 1 4 5
Weights1 3 1 3 1 3 1 3 1 3 1 33 1 3 1 3 1 3 1 3 1 3
Weighted sum8958
Sum mod 1098
(10 − remainder) mod 1012
Full number4006381333931036000291452
Check-digit calculator

Enter the first 12 digits (without the check digit).

Code 128 uses a modulo-103 check symbol inside its structure, and Code 39 has an optional Mod 43 check. Neither is visible to a human reading the label, so there is nothing to calculate by hand — the encoder handles both.

Never invent the digits

A made-up 13-digit string will usually pass its own check digit — the maths does not know the number is fake. It fails later, when a retailer's catalogue rejects it or the scanner resolves it to someone else's product. Check digit validity is not ownership.

4 Types compared — and which one to pick

Pick by where the code will be scanned, not by which one looks tidier. Wrong symbology is the most common beginner mistake, and the most expensive one.

Feature Code 128 EAN-13 UPC-A Code 39
Character set Full ASCII Digits only Digits only A–Z, 0–9, limited symbols
Typical length Variable 12 + check 11 + check Variable (often short)
Retail POS No Yes (global) Yes (US/Canada) No
GS1 number required No Yes for retail Yes for retail No
Density High Medium Medium Lower
Best for Inventory, shipping International products US/Canada products Assets, industrial
SituationUseWhy
Product sold in stores worldwideEAN-13Global retail standard; GS1 number required
Product sold mainly in US/CanadaUPC-ANorth American retail standard
Small package with no room for 13 digitsEAN-8Same standard, 8 digits; still needs a GS1 number
Shipping carton or pallet labelITF-14Prints on corrugated board; carries an SSCC or GTIN-14
Internal warehouse / SKU labelsCode 128Alphanumeric, compact, no GS1 needed
Asset tags, equipment IDsCode 128 or Code 39Internal systems; Code 39 still common in industry
Amazon / marketplace listingsEAN-13 or UPC as requiredMust match marketplace rules and number ownership
BooksEAN-13ISBN-13 is EAN-13 with a 978/979 prefix; enter all 13 digits
Important

Creating a barcode image does not give you the right to use that number in global retail. For store shelves and most marketplaces you need a GS1-issued GTIN. Invented numbers collide with real products and get listings rejected — see section 9.

If you only need internal tracking, skip GS1 entirely and use Code 128 with your own scheme. Document the format once so every team uses the same rules. A one-page internal standard beats a dozen conflicting SKU styles.

Not covered by this tool: two-dimensional symbols (Data Matrix, PDF417, Aztec) and compressed UPC-E — use full UPC-A instead.

5 Barcode vs QR code

Both encode data for a machine to read. They answer different questions: one identifies, the other explains.

Feature1D Barcode (EAN/UPC/Code 128)QR Code (2D)
Data capacity12 digits (EAN/UPC) up to ~80 characters (Code 128)Up to 4,296 alphanumeric characters
Data typeDigits (EAN/UPC) or ASCII (Code 128)Numbers, text, URLs, binary, Wi-Fi credentials
Scanner neededLaser scanner or barcode gunPhone camera or 2D imager
Scan directionMust align horizontallyAny angle, 360 degrees
Error correctionCheck digit only — no damage recoveryReed-Solomon, up to 30% of the symbol recoverable
Retail POSYes — every grocery checkout laser reads theseGrowing, but still not universal in 2026
Best forRetail checkout, inventory, shipping, asset tagsMarketing URLs, menus, Wi-Fi, product info pages

Use a 1D barcode when the scan happens at a counter: POS, warehouse receiving, shipping sortation. The number is short, the laser is cheap, and the whole supply chain already speaks it.

Use a QR code when a human points a phone at it and expects something to happen — a menu, a warranty page, a Wi-Fi login. The processing power sits on the customer's side, so you can spend the space on context instead of a 13-digit key.

Use both when the product sells in a shop and also needs a story. The UPC handles the till; the QR carries the recipe, the batch data or the support page. Most packaged consumer goods made that move years ago.

Sunrise 2027, without the hype

GS1's Sunrise 2027 commits member organisations to accept 2D codes at point of sale alongside 1D codes by the end of 2027. It is an industry readiness target, not a worldwide switch, and adoption differs by country and retailer. If your product sells through chain retail now, print a UPC/EAN — and design the label so it can carry both later.

6 Minimum size — and the X-dimension calculator

There is a floor on how small a barcode can go. Print below it and the label looks perfect on screen, then fails at the till.

Every symbol has an X-dimension — the width of the narrowest bar, in millimetres. Total symbol width, bar height and quiet zone all scale from it. The standards set a minimum X per symbology; your printer's resolution decides whether you can physically hit it.

Here is the part most guides skip. At 203 DPI — a very common thermal label printer — one printer dot is 0.125 mm, so a 2-dot narrow bar is 0.250 mm. That clears Code 128 and sits just under the floor for EAN-13. At 300 DPI one dot is 0.085 mm: 3 dots gives 0.254 mm, and 4 dots gives 0.339 mm. No amount of zooming in the preview fixes a 2-dot EAN-13 on a 203 DPI head.

Do not confuse resolution with magnification. A 600 DPI printer running at 70% magnification still produces bars below the specification, because magnification is measured against the standard, not against your printer.

X-dimension calculator
SymbologyMinimum XSymbol widthNotes
EAN-130.264 mm37.29 mm at 100%, 29.83 mm at 80%80–200% magnification; the 30 mm rule of thumb
UPC-A0.264 mm37.29 mm at 100%Same geometry as EAN-13, one digit shorter
EAN-80.264 mm26.73 mm at 100%For small packages; still needs a GS1 number
ITF-140.495 mmDepends on dataCartons; needs a heavy bar to survive corrugated printing
Code 1280.250 mm11 modules per characterQuiet zone 10X on each side
Code 390.191 mm15 modules per character at 3:1Quiet zone 10X; wide bars make it bulky

Minimums follow ISO/IEC 15417 (Code 128), 15420 (EAN/UPC) and 16388 (Code 39) plus the GS1 General Specifications. Confirm against the current edition for your market before a large print run.

Bar height: as a working rule keep at least 15 mm for handheld scanning, and more for fixed-mount conveyor scanners that read at an angle. A symbol that is wide but 6 mm tall scans badly no matter how clean the bars are.

Quiet zones: the blank margin on each side. EAN-13 uses 11X on the left and 7X on the right; Code 128 uses 10X. Design software crops them without warning when you drag a bounding box — that is one of the top three causes of a barcode that will not scan.

7 Color and contrast rules

Most POS scanners use a red laser at 630–680 nm. They measure reflectance — how much light bounces back from dark bars versus light spaces. Red ink reflects the red laser and appears invisible. Green absorbs it and appears black. That is the whole model, and it only applies to laser scanners.

ColorAs bar colorAs backgroundWhy
BlackSafeDo not useAbsorbs red light — best bar color
Dark navySafeDo not useAbsorbs red light
Dark greenSafeDo not useAbsorbs red light
Dark brownSafeDo not useAbsorbs red light
RedNeverLaser onlyReflects red laser — invisible to a laser, dark to a camera
OrangeNeverLaser onlyReflects red laser
Bright yellowNeverLaser onlyReflects red laser
WhiteDo not useSafeBest background — reflects red light
Cream / light yellowDo not useSafeReflects red light
The nuance most guides miss

Laser and camera scanners do not see color the same way. A red laser measures reflectance at one wavelength, which is why black bars on a red background can scan on an old checkout gun. A phone camera or 2D imager floods the label with white light and reads the whole visible spectrum — for those, red is simply dark. So a black-on-red label that passes on a laser counter can fail when the same label is checked with a handheld imager in the warehouse. If both will scan it, keep black on white.

Never invert. White bars on a black background look high-contrast to a designer and dead to a scanner: the scanner reads the black field as the space and the white bars as the bars, and every symbol comes out reversed.

Glossy vs matte: glossy stock reflects too much light and creates specular glare that blinds the scanner. Use matte label stock for warehouse and retail labels. If the packaging must be glossy, print a white flood area behind the barcode.

Transparent labels: on a colored bottle, the bottle becomes the background. Print a white underlay behind the barcode so contrast survives whatever is underneath.

8 Verify before you print a full run

A barcode that looks right on screen proves nothing. Six checks catch almost every dead label before the paper is wasted.

1

Turn off “fit to page”

In the print dialog choose Actual size or 100%. “Fit to page” and “scale to fit” silently shrink the symbol below its minimum X while the preview still looks correct. This is the single most common cause of a barcode that will not scan.

2

Measure the narrow bar

Compare the thinnest bar against the minimum for your symbology in the table above. A loupe or cheap calipers settle it in seconds; a ruler does not.

3

Check both quiet zones

11X on the left and 7X on the right for EAN-13, 10X each side for Code 128. No text, logo, edge or perforation inside them.

4

Scan with a phone first

If the phone decodes it, the data and the check digit are right and the print is legible. If the phone fails, do not go further — fix contrast, size or the quiet zone.

5

Scan with the real device

The till gun, the warehouse imager, the conveyor head. Phone passing and laser failing almost always means symbology settings on the device, not a bad label.

6

Repeat at real angles

Ten scans: flat, tilted, from 30 cm, from the side. A symbol that only reads when perfectly aligned will cost someone a shift on the loading dock.

A phone is a floor, not a pass

Phone cameras are more forgiving than laser scanners in one direction and less in another. They read damaged and low-contrast labels better than a cheap laser — but they also decode inverted symbols that a laser refuses. A pass on a phone means the data is valid, not that the label is printable.

When this guide was last revised I generated a Code 128 asset tag and an EAN-13 sample, printed both at 100% on matte paper, and scanned them with a phone camera from 15 cm: both decoded first time. A second print at 70% still scanned, but the quiet zone was nearly gone — which is why 100% scale is the recommendation for anything that has to work at a checkout counter.

9 GTIN, EAN, UPC, ASIN — who owns the number

Drawing an image and owning the number are separate steps. Almost every retail failure comes from mixing them up.

To sell in physical retail or on most marketplaces you need a GTIN allocated through GS1. You then use a generator to turn that number into bars. The generator draws; GS1 allocates. A free tool cannot issue you a number, and it cannot tell you whether the one you typed already belongs to a shampoo brand in Taiwan.

TermWhat it actually isIssued by
GTINUmbrella name for the product key; EAN-13 and UPC-A are shorter forms of the same ideaGS1
EAN-13The 13-digit retail symbol used almost everywhere outside North AmericaYour national GS1 member organisation
UPC-AThe 12-digit retail symbol used in the US and CanadaGS1 US
ASINAmazon's own catalogue ID — it identifies a listing, not your productAmazon, automatically
FNSKUAmazon's fulfilment label, stuck over your UPC on FBA unitsAmazon, automatically
ISBNBook identifier; ISBN-13 is an EAN-13 starting 978 or 979National ISBN agency

For internal use — warehouse bins, sample kits, employee badges — none of this applies. Code 128 with your own numbering scheme is enough, and no GS1 membership is required.

India: the 890 prefix and why resold barcodes are a trap

GS1 India is the only body authorised to issue numbers beginning with 890, and that prefix is what Indian retail and marketplaces recognize. Amazon, Flipkart, Blinkit, Myntra and BigBasket list GS1-registered GTINs as a listing requirement. In 2026 the Delhi High Court restrained an overseas reseller from selling 890 numbers without GS1 India's authorisation. A cheap barcode bought from a reseller is not a licence to use that prefix, and the number can be withdrawn under you long after the packaging is printed.

Books: ISBN, and what KDP actually gives you

An ISBN-13 is an EAN-13 with a 978 or 979 prefix, which is why a book barcode looks like a grocery barcode — because it is one. In India, ISBNs are issued by the Raja Rammohun Roy National Agency under the Ministry of Education through isbn.gov.in. In the US, Bowker sells them. Amazon KDP generates the barcode from your ISBN at no charge, so paying a third party for a "book barcode" image is usually money for something you already have.

GS1 US pricing (indicative — confirm current fees)

Number of productsInitial feeAnnual renewal
1 GTIN (single product)$30 one-time$0
10 GTINs$250$50/year
100 GTINs$750$150/year
1,000 GTINs$2,500$500/year
10,000 GTINs$6,500$1,300/year
100,000 GTINs$10,500$2,100/year

A single GTIN at $30 with no annual fee is the cheapest route for a handful of products. A GS1 Company Prefix pays off once you pass roughly ten codes. Fees differ by country and change without notice — check the current schedule on the GS1 US site and on GS1 India before budgeting.

FBA: the label that gets covered

Amazon requires a valid UPC or EAN to create a listing, then applies its own FNSKU over your barcode on every unit it stores. The UPC is still mandatory — it is the key that ties the listing to a real product — but the symbol the warehouse actually scans is Amazon's. Printing elaborate UPC labels for FBA-bound cartons is wasted ink.

The one rule that does not change

A generated image never grants the right to use a number in global retail. If it goes on a shelf or a marketplace, the number has to come from GS1 or the relevant ISBN agency.

10 PNG vs SVG and print

Choose the format for the next step in the workflow. Print jobs almost always want vector.

FormatBest forWatch out for
PNGWeb, email, Word and PDF embeds, on-screen previewsRaster: it has a fixed pixel width. Scaling up resamples the bars and softens the edges.
SVGLabels, packaging, large format, anything going to a printerVector: it stays exact at any size, but some label software ignores quiet zones when you place it.

For a PNG, print at about 300 DPI at the final label size. A 30 mm wide EAN-13 at 300 DPI is roughly 350 pixels across; at 150 DPI it is 175, and the narrow bar falls below reliability on most thermal printers.

Two print settings undo more good barcodes than any other cause. “Fit to page” rescales the symbol to fill the paper, and “shrink to fit” does it silently in some PDF viewers. Set scaling to 100% or Actual size every time, then check the printed width with a ruler before running the box.

The rest is stock and contrast: black bars on a light background, the minimum bar width for the symbology, quiet zones left intact, and the same scanner model your store or warehouse actually uses.

Avoid glossy film without testing it first — reflections confuse some scanners at some angles, which is the worst kind of failure because it works on your desk and not on the dock. Matte label stock is safer for high-volume use. On colored packaging, keep a solid light panel behind the barcode.

11 Bulk generation — from ten codes to ten thousand

Scale the method to the count. The tool that is pleasant for one code is painful for a thousand, and the reverse is also true.

The AFFLIGO Barcode Generator takes one value per line in its Batch tab, generates up to 50 at a time, and exports them as a ZIP of PNGs. That covers a product launch, a shelf relabel or a box of asset tags without touching a script.

Past a few hundred, move the data into a spreadsheet and let the registry and the barcode come from the same row. Libraries such as JsBarcode and BWIP.js render to canvas or SVG and are the sane choice for a one-off job; a dedicated label application earns its keep once the same label has to be reprinted every month.

Excel route: one code per row in column A, one product per row beside it. Paste the column into the Batch tab for a small run, or export CSV and feed it to a script for a large one. Barcode fonts are the third option and the riskiest — glyph rendering depends on point size, so a half-point change shifts the bars off specification while the cell still looks correct on screen.

Word and Avery route: mail-merge the spreadsheet into the label template, but merge the barcode image, not the number text. Print one merged page at 100% and scan it before committing to the sheet — merged fields are where quiet zones get cropped by the template margins.

Whatever the method, keep a registry: value, product, date assigned, owner. It prevents two teams inventing the same code six months apart, and it makes a reprint trivial. Put three known-good control labels in every bulk run: if the controls fail to scan, the fault is the printer, the media or the settings — not one bad number.

12 Why scans fail — the ranked list

Almost every failure is print or data, not software. Work down the table in order; the top rows are the ones that actually happen.

Barcode problemLikely causeWhat to try
Scans on screen, dead in print “Fit to page” or shrink-to-fit scaled the symbol down Print at 100% / Actual size, then measure the printed width
Printer stretched the symbol Non-uniform scaling in the label template or PDF export Place the image at its natural size; never drag the corner handles
Scanner will not read Low contrast, tiny size, missing quiet zone Black on white, larger print, more margin
Wrong data after scan Wrong type or invalid check digit Match type to data; let tool compute check digit
Retail listing rejected Number not GS1-owned Obtain proper GTIN; do not invent retail codes
Blurry when enlarged PNG scaled up too far Export SVG for large labels; use 300 DPI minimum for PNG
Works on phone, fails on POS Wrong symbology for that scanner Confirm EAN/UPC vs Code 128; check scanner symbology settings
Red or colored bars won't scan Color reflects red laser light Use black, dark navy, or dark green bars on white background
White bars on black won't scan Inverted reflectance confuses laser Use black bars on white — never reverse the colors
Glossy label won't scan Specular glare from shiny surface Use matte label stock; or print white flood area behind barcode
Transparent label on colored bottle Bottle color shows through as background Print white underlay behind the barcode area
Bars look smeared or too wide Ink bleed on absorbent paper Use tighter stock; reduce bar width; try thermal transfer printer
Print resolution too low Narrowest bar is only 1-2 dots wide Use 300+ DPI printer; or export as SVG (vector, resolution-independent)
Scanner beeps but no data appears Scanner not configured for that symbology Enable the barcode type in scanner settings; check manufacturer config tool

13 Privacy — the code never leaves the tab

An internal SKU list is more sensitive than a product photo. It is a map of your catalogue.

Many online generators post the value to a server and send an image back. For a marketing URL that is harmless. For warehouse codes, batch numbers and unpublished product lines, it means someone else now holds a copy of your inventory structure.

The AFFLIGO Barcode Generator renders in the browser with JavaScript. Nothing is uploaded, nothing is stored, there is no account, and the downloaded file carries no watermark or tracking metadata. Once the page has loaded it keeps working without a connection. The same applies across the site's privacy policy.

14 FAQ

The questions that actually come up after the first print run.

Retail checkout: EAN-13 outside North America, UPC-A in the US and Canada, both with a GS1-issued number. Internal tracking, shipping and asset tags: Code 128. Shipping cartons: ITF-14. Small packages: EAN-8. Code 39 only when a partner system still requires it. The full decision table is in section 4.

Only if the code goes on a product sold through retail or a marketplace, in which case you need a GS1-issued GTIN. For warehouse bins, assets or shipping labels you can use any numbering scheme you like with Code 128, and no membership is involved.

GTIN is the umbrella term for the product number. EAN-13 and UPC-A are two ways of printing it — 13 digits globally, 12 digits in North America. ASIN is Amazon's own catalogue ID and has nothing to do with your barcode; Amazon assigns it when the listing is created.

Phone cameras decode far more aggressively than a checkout laser. A pass on a phone proves the data and check digit are valid — not that the print is good enough for a laser. The usual culprits are a symbol scaled below its minimum X-dimension, a cropped quiet zone, or a symbology the till scanner was never configured to accept.

Below about 80% magnification, yes — the narrow bar drops under the minimum X-dimension for EAN and UPC, and most laser scanners stop trusting the read. Above 80% it is usually fine. The damage comes from “fit to page” scaling, which can land anywhere between 60% and 95% without telling you.

You can buy a resold prefix, but you do not own it, and it can be withdrawn. In India, GS1 India is the only body authorised to issue 890-prefix numbers, and a 2026 Delhi High Court order restrained an overseas reseller from selling them. Marketplaces check prefix ownership, so a cheap barcode usually fails at listing time rather than at the scanner.

EAN-13 bottoms out at 29.83 mm wide — 80% magnification — and Code 128 needs a narrow bar of at least 0.250 mm, which is 3 dots on a 300 DPI printer but 2 dots on a 203 DPI one. Height matters too: keep at least 15 mm for handheld scanning. The calculator in section 6 does the arithmetic for your own printer.

Create a barcode now

Code 128, EAN-13, UPC-A, EAN-8, ITF-14 and Code 39. Free, no signup.

Open Barcode Generator

Key Takeaways

Karan Kumar, Founder of AFFLIGO

Karan Kumar

Built AFFLIGO

Karan built AFFLIGO's Barcode Generator — the encoder, the check-digit logic and the PNG/SVG export for Code 128, EAN-13, UPC-A, EAN-8, ITF-14 and Code 39. Each release is print-tested at 100% on matte stock and phone-scanned per symbology before publishing, and the minimum-size figures in this guide come from that testing. Last reviewed: November 4, 2026.

Instagram X GitHub