Skip to content
Tools

Barcode Generator

Generate professional 1D barcodes instantly with support for retail, inventory, shipping and product identification. Everything runs locally in your browser.

Code 128
Export format

barcode-code128-INERTIA-2026

Preview mode
Code 128 barcode for INERTIA-2026
167 modules · 354 × 140 px
Panel
14

14 one-dimensional symbologies. QR codes and other 2D formats live in the QR Code Generator.

Code 128 · 12 characters · 167 modules · 354 × 140 px

Everything happens locally in your browser. Your barcode data is never uploaded or stored.

What is a barcode?

A barcode is a number written in a way a machine can read reliably and a person cannot read at all. Bars and spaces of varying width encode digits or characters; a scanner measures the widths and reconstructs the value.

The important thing about a retail barcode is what it does not contain. The barcode on a tin of beans holds no price, no name and no description — only an identifier. Everything else lives in a database the till looks the number up in. That is why the price can change without reprinting the packaging.

What an EAN-13 actually carries
5901234123457│└─┬─┘└──┬──┘└┬┘└┬│  │     │    │  └─ check digit│  │     │    └──── item reference│  │     └───────── manufacturer code│  └─────────────── GS1 prefix (country of registration)└────────────────── not drawn — recovered from the parity pattern

“1D” means the data runs along a single axis: the bars only vary horizontally, and their height exists purely so the scanner can find them from an imprecise angle. Every symbology on this page is one-dimensional.

How barcodes work

A scanner sweeps a beam or a camera across the symbol and measures how long it spends on dark and light. Those timings become relative widths, the widths become a pattern, and a lookup table turns the pattern back into characters.

Three parts of the symbol exist so that can work at all, and each is a place barcodes go wrong:

  • Guard patterns. Fixed bars at the start, middle and end. They tell the scanner where the symbol begins, how wide one module is, and — because they are symmetrical — whether it is being read upside down.
  • The quiet zone. Clear space either side, usually ten times the narrow bar width. It is part of the barcode, not margin. Cropping it is the most common reason a printed barcode fails to scan.
  • The check digit. Calculated from the other digits, recomputed on every read. It cannot repair a bad scan — it makes one fail rather than silently return the wrong product.

EAN-13 has one further trick worth knowing, because it explains the format’s whole shape. Thirteen digits are encoded but only twelve are drawn. The first is recovered from the parity pattern of the left-hand six — each is printed in one of two encodings, and which six were chosen spells out the missing digit. Without it the symbol would be measurably wider.

Supported barcode formats

Fourteen symbologies. Most people need one of the first three; the rest exist because some industry standardised on them decades ago and has not moved.

Code 128

ISO/IEC 15417★★★★★

Encodes the full ASCII set at the highest density of any 1D symbology, and switches automatically into a numeric mode that packs two digits per symbol — which is why a numeric Code 128 is roughly half the width of the same digits in Code 39. Its check digit is mandatory and calculated for you.

All 128 ASCII characters · Any length

GS1-128

GS1 General Specifications★★★★★

The same bars as Code 128, with an agreed vocabulary layered on top. Each field begins with an Application Identifier in brackets — (01) is a product number, (17) an expiry date, (10) a batch — so a scanner knows what it just read rather than getting an opaque string. This is what is on a pallet label.

Digits and ASCII, structured by Application Identifier · Depends on the identifiers used

Code 39

ISO/IEC 16388★★★★

The first alphanumeric symbology in wide use, and still specified by defence and automotive standards for exactly that reason. It has no lowercase, no punctuation beyond a handful of symbols, and takes roughly three times the width of Code 128 for the same data. Choose it when something in the chain demands it.

0-9, A-Z, space and - . $ / + % · Any length

Code 93

AIM BC5★★★★

Designed to fix Code 39's density and reliability: about 25% narrower for the same data, with two check characters instead of none. It never displaced Code 39 in the field, largely because Code 128 arrived and did more.

0-9, A-Z, space and - . $ / + % · Any length

Codabar

AIM / ANSI MH10.8M★★★★★

Predates the microprocessor and survives because it can be printed by machines that cannot do anything cleverer, and read reliably without a check digit. Start and stop characters are letters A to D, which some systems use to signal what kind of item was scanned.

0-9 and - $ : / . +, wrapped in A-D · Any length

EAN-13

ISO/IEC 15420★★★★★

Thirteen digits: a country or product prefix, a manufacturer code, an item code and a check digit. Only twelve are drawn — the first is recovered from the parity pattern of the left-hand six, which is the neatest trick in the standard and the reason the symbol is not wider.

Digits only · 13 digits, or 12 without the check digit

EAN-8

ISO/IEC 15420★★★★★

Eight digits rather than thirteen, for confectionery, cosmetics and anything else where a full EAN-13 would not fit on the face of the pack. Numbers are allocated individually rather than by manufacturer prefix, so they are scarcer and issued only where the short form is genuinely needed.

Digits only · 8 digits, or 7 without the check digit

UPC-A

ISO/IEC 15420★★★★★

Twelve digits, and structurally identical to an EAN-13 beginning with 0 — the same 95 modules, drawn the same way. The distinction is administrative rather than technical, and every modern scanner treats them as one.

Digits only · 12 digits, or 11 without the check digit

UPC-E

ISO/IEC 15420★★★★

Six digits standing in for a full twelve, by a set of rules about where the zeros were. Only codes with enough trailing zeros can be compressed at all — which is why UPC-E numbers are allocated deliberately rather than derived from any UPC-A. The check digit comes from the expanded form, not the six digits you see.

Digits only, number system 0 or 1 · 8 digits including the check digit

ITF (Interleaved 2 of 5)

ISO/IEC 16390★★★★★

Encodes digits in pairs — the first in the bars, the second in the spaces between them, which is where the name comes from. That interleaving is why the digit count must be even, and why it tolerates the rough printing on shipping cartons better than most.

Digits only · An even number of digits

MSI Plessey

MSI (de facto)★★★★★

A variant of Plessey used almost exclusively for inventory control on shelf labels, where the same code is read repeatedly by the same equipment. It has no formal standards body, which is part of why it never spread beyond that niche.

Digits only · Any length

Pharmacode

Laetus Pharmacode★★★★★

Not a character encoding at all — the value is a binary number where a narrow bar is 1 and a wide bar is 2, read right to left. It carries no check digit and no error detection, because it is used on packaging lines where the expected value is already known and the scan is a confirmation rather than a lookup.

A whole number · 3 to 131070

ISBN-13

ISO 2108★★★★★

Since 2007 every ISBN is a thirteen-digit number beginning 978 or 979, which makes it a valid EAN-13 — so the barcode on a book is an ordinary retail barcode and scans at any till. The hyphens people write are grouping for humans and are not encoded.

Digits, with optional hyphens · 13 digits beginning 978 or 979

ISSN

ISO 3297★★★★★

The serials equivalent of an ISBN. The eight-digit ISSN is prefixed with 977, given two issue-variant digits and a fresh EAN-13 check digit — which is why the number under a magazine barcode does not match the ISSN printed on its masthead.

Digits, with optional hyphen · 13 digits beginning 977

Barcode vs QR code

Not competitors — they solve different problems. A 1D barcode carries an identifier; a QR code carries content. Choosing between them is really choosing whether the data lives in the symbol or in a database.

Aspect1D barcodeQR code
Data capacityUp to about 20 useful charactersUp to 4,296 alphanumeric characters
Error correctionA check digit at best — detects, cannot repairReed–Solomon; readable with up to 30% obscured
ShapeWide and short; grows sideways with dataSquare; grows in both directions
ScanningLaser or camera, one axis, needs alignmentCamera only, any angle, any rotation
RetailUniversal — every till in the worldRare on the product itself
InventoryThe default for shelf, bin and carton labelsWhere more data must travel with the item
MarketingAlmost never — it encodes a number, not a linkThe whole point: a URL anyone can scan with a phone

The row that decides it is error correction. A QR code survives being torn, smudged or partly covered because up to 30% of it is redundancy. A 1D barcode has a check digit, which detects damage but cannot repair it — so a scratched barcode fails to read rather than reading wrongly. Both are safe; only one is robust.

Which is why retail has not moved. A barcode on a product only has to survive the supermarket, and the installed base of laser scanners at tills is enormous. Where the data must travel with the item — a URL, a batch record, a serial history — 2D wins. If that is what you need, the QR Code Generator is the other tool.

How to generate a barcode

  1. 1. Choose the symbology. Code 128 unless something forces your hand — it takes any text and stays narrow. Search the format list by name or by use if you are not sure; each entry says what it is for.
  2. 2. Enter the data. Validation runs as you type. If a check digit is missing it is calculated and added; if it is wrong you are told the right one. Nothing is drawn unless it would actually scan.
  3. 3. Set the size. Bar width and height decide whether it can be read, and from how far. Watch the quiet zone — the tool warns when it drops below what a scanner needs.
  4. 4. Style it. Colours, font and whether the human-readable text sits above, below or nowhere. Keep the bars dark on a light background.
  5. 5. Export. SVG or PDF for print — both are vector and stay crisp at any size. PNG for screens. Or print directly, which sends the barcode at its exact dimensions rather than scaling it to the page.

A template does steps one to three at once for a known job — a retail product, a shipping label, a library book — because the format and the geometry are related and choosing one without the other leaves the hard half undone.

Barcode best practices

Choose the right symbology

  • Code 128 for anything internal. Densest, most capable, read by everything. A numeric Code 128 is about half the width of the same digits in Code 39.
  • EAN-13 or UPC-A only with a real GS1 number.Inventing one works for your own stock control and will collide with somebody else’s product the moment it meets a retailer.
  • Match what already exists. If the scanner, the WMS or the trading partner expects a format, that decision is already made.

Print quality

  • Print vector, not raster. SVG or PDF stay sharp at any size. A PNG scaled up gives soft bar edges, and soft edges are what a scanner mismeasures.
  • Never scale to fit. Shrinking a barcode to fill a gap can take the narrow bar below what the scanner can resolve. Set the size deliberately and print at 100%.
  • Watch ink spread. On absorbent stock, bars print wider than drawn. Commercial printers compensate with bar-width reduction; if a proof scans and the production run does not, this is usually why.

Contrast

  • Dark bars, light background. Black on white is the only combination guaranteed to work everywhere; if a brand colour is being insisted on, the colour picker will tell you the contrast ratio it actually achieves against white.
  • Avoid red bars entirely. Many scanners use red light, which cannot distinguish red from white. A red barcode is invisible to them.
  • Never print on a busy background. Photographs and gradients behind a barcode destroy the contrast the scanner is measuring.

Quiet zone

  • Leave at least ten narrow-bar widths clear on both sides. It is part of the symbol.
  • Keep other artwork out of it. A price, a logo or a fold that intrudes into the quiet zone breaks the scan as surely as covering a bar.

Label size and placement

  • Taller is easier to scan. Height carries no data — it exists so the beam finds the bars when the angle is imperfect. On a fast-moving line, make it generous.
  • Keep the human-readable text. It is the fallback when a scan fails, and somebody has to key the number in.
  • Avoid curves and corners. A barcode wrapped around a bottle or folded over an edge cannot be read as a straight line, which is the only way it can be read.

Common barcode use cases

Wherever a physical thing needs to be identified by a machine, quickly and cheaply.

Retail products

EAN-13 outside North America, UPC-A inside it. Both need a number allocated from a GS1 company prefix if the product will be sold through a retailer rather than only tracked internally.

Warehouse management

Code 128 on bin, shelf and location labels. Short codes keep the symbol narrow enough for a shelf edge, and its numeric mode halves the width when the code is all digits.

Shipping labels

Code 128 or GS1-128, printed tall so a handheld scanner reads them at an angle across a loading bay. GS1-128 adds the structure carriers expect.

Asset tracking

Code 128 on durable labels for equipment, IT hardware and tools. The code only has to be unique within your own system, so there is nothing to register.

Books and periodicals

ISBN-13 and ISSN, both carried as EAN-13. That is why a book scans at an ordinary supermarket till: the barcode is a retail barcode in the book industry's number range.

Healthcare

GS1-128 for product, batch and expiry on cartons; Codabar still in blood banks; Pharmacode on packaging lines where the scan confirms what the machine already expects.

Manufacturing

Code 39 persists here because automotive and defence standards specify it, and those standards outlast the equipment. It is wider than Code 128 and universally readable.

Event tickets

Code 39 or Code 128, chosen by what the gate scanner understands. The code usually encodes a reference that is checked against a list rather than carrying data itself.

Inventory management

MSI on supermarket shelf edges, ITF on outer cases. ITF tolerates the rough printing on corrugated card better than finer symbologies do.

Frequently asked questions

Is this Barcode Generator free?

Yes. All fourteen symbologies, every customisation option, the templates and every export format are free, with no account, no watermark and no cap on how many barcodes you make.

Is my barcode data uploaded?

No. The barcode is encoded and drawn by your own browser — there is no network request involved in generating, previewing, printing or downloading one. You can disconnect after the page loads and keep working. That matters because barcode data is often a product code, a tracking number or a patient identifier.

Are the barcodes free to use commercially?

Yes. A barcode is a rendering of a number you supply; there is nothing to license in the symbol itself. What you may need to pay for is the *number* — a GS1 company prefix, if you want an EAN or UPC that is unique worldwide and will scan at a retailer's till.

Which barcode format should I use?

Code 128 unless something forces your hand. It takes any ASCII text, packs digits two per symbol so numeric codes stay narrow, and every scanner made in the last thirty years reads it. Use EAN-13 or UPC-A only for retail products with a real GS1 number, and Code 39 only when a system you cannot change demands it.

What is Code 128 and why is it the default?

The densest and most capable 1D symbology: the full ASCII set, an automatic numeric mode that halves the width of digit strings, and a mandatory check digit. For an internal code — an asset tag, a shipping reference, a warehouse location — it is almost always the right answer.

What is the difference between EAN-13 and UPC-A?

Almost nothing technical. A UPC-A is an EAN-13 whose first digit is zero, drawn with the identical 95 modules. The split is administrative and historical: UPC came first in North America, EAN extended it internationally. Every modern scanner reads both and most systems store them interchangeably.

Can I make my own EAN-13 barcode?

You can generate the symbol here, and it will scan. Whether you should *use* it depends on where: for internal stock control, any valid number is fine. To sell through a retailer you need a number allocated from a GS1 company prefix, because that is what guarantees it belongs to your product and nobody else's.

What is a check digit and why does it matter?

The last digit of an EAN, UPC or ISBN, calculated from the ones before it. A scanner recalculates it and rejects the read if it disagrees — which is how a smudged or partly obscured barcode fails safely rather than reading as a different product. This tool calculates it for you if you leave it off, and tells you the right value if you get it wrong.

Can I generate an ISBN barcode?

Yes. Since 2007 every ISBN is thirteen digits beginning 978 or 979, which makes it a valid EAN-13 — so a book barcode is an ordinary retail barcode. Paste a ten-digit ISBN and the tool works out the thirteen-digit equivalent for you.

What about ISSN barcodes for magazines?

Yes. The eight-digit ISSN is prefixed with 977, given two issue-variant digits and a fresh check digit. That is why the number printed under a magazine barcode does not match the ISSN on its masthead — they are related but not the same number.

What is GS1-128 and how is it different from Code 128?

The same bars with a grammar on top. Each field starts with an Application Identifier in brackets — (01) a product number, (17) an expiry date, (10) a batch — so the scanner knows what it read rather than getting an opaque string. This is what is on a pallet label or a pharmaceutical carton.

Why does UPC-E only accept certain numbers?

Because it is a compression, not a format. UPC-E squeezes a twelve-digit UPC-A into six by removing runs of zeros, and only codes with the zeros in the right places can be compressed at all. That is why UPC-E numbers are allocated deliberately rather than derived from any UPC-A you happen to have.

What is Pharmacode and why does it have no check digit?

It is a number written in bars — narrow for 1, wide for 2, read right to left — used on pharmaceutical packaging lines. It has no check digit because it is not a lookup: the machine already knows which carton it expects, and the scan confirms it. That also makes it robust when printed badly, which is the point.

Can I validate a barcode before printing it?

That is what this tool does continuously. Length, character set and check digit are checked as you type, and generation is refused rather than producing a symbol that scans as something else. Where a check digit is wrong, the correct value is named.

What size should a barcode be?

Bigger than you think, and it depends on how it will be read. A retail EAN-13 is nominally 37.29 × 25.93 mm and may be scaled between 80% and 200% of that. For anything else, the practical rule is that a handheld scanner needs the narrow bar to be at least 0.25 mm, and that a taller barcode is easier to scan at an angle.

What is a quiet zone and why does my barcode not scan without one?

The clear space either side of the symbol. It is not margin — it is part of the barcode, and a scanner uses it to find where the symbol starts and ends. Ten times the narrow bar width is the usual minimum. Cropping it off is the single most common reason a printed barcode fails to read.

Can I use coloured barcodes?

Cautiously. Scanners measure contrast, and many use red light — which cannot distinguish red bars from a white background at all. Dark bars on a light background is the only combination that reliably works; black on white is the only one guaranteed to.

Which download format should I choose?

SVG or PDF for anything that will be printed, because both are vector and stay crisp at any size — and a barcode is all about crisp edges. PNG for screens and documents. WebP when file size matters. JPEG only if something downstream demands it: its compression softens exactly the hard edges a scanner reads.

What does the print quality setting do?

It multiplies the pixel dimensions of the raster exports. Standard is screen resolution, HD doubles it, and Print quadruples it — roughly 384 dpi, enough for a label printer. It has no effect on SVG or PDF, which are resolution-independent already.

Will the printed barcode be the right size?

Yes, if you print from this tool: the print view sends the barcode at its exact dimensions rather than scaling it to fit the page. Scaling is what breaks printed barcodes — a symbol shrunk to fit an A4 margin can end up with bars too narrow for a scanner to resolve.

Can I print several barcodes on one sheet?

Not from this tool directly — it produces one barcode at a time. Download as SVG or PDF and place them in whatever does your label layout; because both are vector, they can be repeated and positioned without any loss of quality.

Why is my barcode so wide?

Almost always the symbology. Code 39 takes roughly three times the width of Code 128 for the same digits, because it encodes one character per nine elements with no numeric mode. If a code is too wide to fit its label, switching to Code 128 is usually the whole fix.

Can I generate a QR code here?

No, deliberately. This tool covers one-dimensional barcodes only. QR codes, Data Matrix and the other 2D symbologies work on entirely different principles — error correction, masking, a two-axis grid — and live in the QR Code Generator instead.

Does the barcode work offline?

Once the page has loaded, yes. Encoding, rendering, printing and every export happen locally, so it keeps working with the network disconnected.

Why does the text under the barcode matter?

It is the fallback. When a barcode will not scan — damaged label, poor print, broken scanner — somebody has to key the number in, and the human-readable line is what they read. Hiding it makes a tidier symbol and a worse one.

Popular tools

↑ ↓NavigateOpenEscClose