Barcode Generator

2
90
16
10
Bars / background
* Encoding follows the international standards. A module width of 2 pixels or more scans reliably; for print keep the module width above 0.25 mm and preserve the quiet zone.

Key features

Seven symbologies

Code 128, Code 39, EAN-13, EAN-8, UPC-A, ITF-14 and ISBN cover retail, logistics and publishing use cases

Automatic check digits

EAN, UPC, ITF and ISBN append the check digit for you, and a full code you paste in is validated with the correct value shown if it is wrong

Pure SVG vector output

Bars are drawn as individual rectangles rather than a bitmap, so edges stay crisp at any zoom level on print and in design files

Fully adjustable appearance

Module width, bar height, text size, quiet zone, bar colour and background colour can all be tuned to match a label or a brand palette

PNG and SVG export

Download a 3x PNG for documents and printing, or the SVG source to hand to a designer for further editing

Self-contained encoding tables

Every table is embedded in the page with no external calls, so the tool works offline and your data never leaves the browser

How to use the barcode generator

1

Choose a symbology

Use EAN-13 or UPC-A for retail products, ISBN for books, ITF-14 for shipping cartons, and Code 128 for internal numbering and general purpose labels.

2

Enter the data

For numeric symbologies just type the digits; you do not need to compute the check digit. The field validates the character set and length as you type and explains any problem below.

3

Tune the appearance

Drag the module width, bar height, text size and quiet zone sliders and pick your colours. The preview updates live and the chips below show symbology, character count, module count and check digit.

4

Export

Download PNG for a 3x raster image, download SVG for a vector file, or copy the SVG source straight into a web page or design tool.

Where a barcode generator helps

Product labels and retail

Generate EAN-13 codes for your own products to print shelf labels, or reprint a label when no barcode printer is available

Books and publishing

Produce ISBN barcodes for self-published titles, internal reports and course materials, with automatic ISBN-10 to ISBN-13 conversion

Warehousing and cartons

Create ITF-14 carton codes to pair with bin locations for scan-based receiving and stock checks

Asset and file numbering

Tag equipment, archive boxes and samples with Code 128 identifiers that a handheld scanner can read straight into a system

Packaging mock-ups

Placeholder barcodes for packaging design can be exported as SVG and dropped into Illustrator or Figma without losing sharpness

Teaching how barcodes work

Change the module width and watch how bars and spaces shift, which beats a textbook diagram for explaining one dimensional encoding

About barcodes

How a one dimensional barcode turns digits into bars

A barcode is fundamentally a binary string. Each character maps to a fixed pattern of bars, which are dark, and spaces, which are light. As a scanner sweeps across, the light and dark transitions become ones and zeros that are decoded back into characters using the symbology table. What separates the symbologies is the table and the structure: Code 128 uses eleven modules per character and three character sets, A, B and C, to cover the full ASCII range while packing digits tightly, whereas EAN uses seven modules per digit plus complementary left and right encodings and a parity pattern in the first digit for self-checking.

What the check digit does

A check digit guards against typing and scanning errors. EAN, UPC and ITF use a modulo 10 weighted scheme: working from the right, multiply alternating digits by 3 and 1, sum the products, take the last digit, and subtract it from 10. Code 128 uses modulo 103: the start character value plus the sum of each character value multiplied by its position, all modulo 103. A check digit catches virtually all single character errors and most transpositions of adjacent characters, which is why retail codes almost never let a typo through.

Why the quiet zone is not optional

The quiet zone is the blank margin on both ends of a barcode. It tells the scanner where the symbol starts and stops. EAN-13 requires at least 11 modules on the left and 7 on the right, and Code 128 generally needs 10. If the quiet zone is cropped away or covered by other graphics, the scanner may never find the start or stop pattern and simply fails to read. This is the single most common reason a home-made barcode will not scan.

Wide to narrow ratio and print resolution

The wide to narrow ratio is the width of the widest element compared with the narrowest. Code 39 is commonly printed at 2:1 or 3:1, and 3:1 tolerates printing errors better. Code 128 and EAN use a single narrow element width and distinguish characters by how many modules they span. In print the critical risk is a narrow bar bleeding into its neighbour: module widths under 0.25 mm, print resolution below 300 dpi, or ink spread that fattens narrow bars can all make a scanner misread. That is why the PNG export here defaults to 3x resolution.

How EAN-13 relates to UPC-A

UPC-A is the twelve digit code used in North American retail and EAN-13 is the thirteen digit international equivalent. The structures are compatible: prefixing a UPC-A with a zero produces an EAN-13, which is why modern scanners read both. The difference is that the first EAN-13 digit selects a parity pattern for the six left hand digits, while UPC-A always uses the L encoding for all six, so the two are not freely interchangeable.

Barcode symbology reference

Symbology Length Character set Check digit Typical use
Code 1281-80 charactersFull ASCII, including lowercase and symbolsModulo 103General IDs, assets, shipping labels
Code 391-40 charactersDigits, uppercase, - . space $ / + %Optional modulo 43Industrial, automotive, defence
EAN-1313 digitsNumericModulo 10Global retail products
EAN-88 digitsNumericModulo 10Small retail packages
UPC-A12 digitsNumericModulo 10North American retail
ITF-14Even count, usually 14NumericModulo 10Shipping cartons and pallets
ISBN10 or 13 digitsNumeric, final X allowed in ISBN-10Modulo 10 / 11Books and publications

Frequently asked questions

Q: What is the difference between a barcode and a QR code?
A: A barcode is one dimensional with small capacity, loose print tolerances and fast scanning, used for products and logistics. A QR code is a two dimensional matrix with large capacity that can hold URLs and non-Latin text, but needs better print resolution and a camera.
Q: How is the EAN-13 check digit calculated?
A: From the right, multiply alternating digits by 3 and 1, sum them, take the last digit and subtract from 10. For 690123456789 the sum is 128, so 10 - 8 = 2 and the full code is 6901234567892.
Q: Will the generated barcode actually scan?
A: Yes. The tables match the international standards and were verified against a mainstream library. Keep the module width at 2 pixels or more and the bar height at 40 pixels or more; for print use at least 0.25 mm modules and preserve the quiet zone.
Q: Why do ISBN barcodes start with 978?
A: An ISBN-13 is an EAN-13 with the book prefixes 978 or 979. Converting an ISBN-10 means prepending 978, keeping the first nine digits and recomputing the EAN check digit. This tool handles both lengths.
Q: Should I use Code 128 or Code 39?
A: Code 128 is denser, supports full ASCII and takes about half the width. Code 39 covers only 43 characters but is simple and widely supported by older scanners. Prefer Code 128 for new work.
Q: Why must ITF have an even number of digits?
A: Bars and spaces each carry a digit and share five bars and five spaces per pair, so digits must pair up. ITF-14 is fixed at 14 digits, the last being the check digit.
Q: Is the barcode data uploaded anywhere?
A: No. The tables are embedded in the page and everything runs in your browser, so the tool works offline and nothing is sent to a server.