Barcode generator

Complete guide to generating professional barcodes with 23 types, batch export and label sheet printing

Overview

The Barcode Generator is a free, browser-based tool for creating professional 1D and 2D barcodes. It supports 23 barcode types covering retail, logistics, postal, healthcare and publishing industries. All processing happens locally in your browser - no data is ever sent to a server.

23 barcode types
EAN, UPC, Code 128, PDF417, ISBN, postal codes and more
Auto check digit
GS1 Mod-10 for EAN, UPC, ITF-14 and GS1 DataBar
Label sheet PDF
Avery 5160, A4 templates or custom layouts
100% client-side
No data leaves your browser, no registration

Interface walkthrough

The interface is split into two panels with a type selector at the top. Here's what each part does:

1

Barcode type selector

At the top, you'll find all 23 barcode types organized into categories:
Retail & Commercial - EAN-13, EAN-8, UPC-A, UPC-E, EAN-2, EAN-5, ISBN-13
Industrial & Logistics - Code 128, Code 39, Code 93, ITF-14, ITF
Specialty - Codabar, MSI Plessey, Pharmacode, Code 11, Plessey
Advanced 2D & Postal - PDF417, GS1 DataBar, Royal Mail, USPS Postnet, USPS IMb, Telepen
Click any type to select it. The input field and validation rules adapt automatically.

2

Left panel - Input & Settings

The left side contains the input area and 4 settings tabs:
Input textarea - enter one value for single mode, or multiple lines for batch mode
Import CSV button - upload a CSV file to populate batch values
GS1 button - enable GS1 Application Identifier parsing mode
Range tab - serial range generator with prefix, suffix, padding, mask
Colors tab - foreground (bar) and background colors
Size tab - bar width, height, margin, font size sliders
Text tab - show/hide value text, rotation (0/90/180/270 degrees)

3

Right panel - Live preview

The right side shows your barcode in real-time. Above the preview are three buttons:
History (clock icon) - view recently generated barcodes
Preset Manager (star icon) - save current style as a reusable preset
Fullscreen (expand icon) - view barcode in fullscreen for easy scanning

4

Export section

Below the preview you'll find the export options:
Format buttons - SVG, PNG, JPG, PDF, DOCX
Resolution slider - 72-600 DPI for PNG/JPG (hidden for SVG/PDF)
Label sheet mode - enable for PDF label sheet export with Avery/A4 templates
Download button - download single barcode or batch ZIP
Scan to Verify button - verify printed barcodes via camera or image upload

Barcode types

The tool supports 23 barcode formats organized into 5 categories. Each type has specific character sets, length requirements, and use cases.

Retail & Commercial

Standard barcodes used in retail, supermarkets, and product packaging worldwide.

EAN-13
12 data digits + auto check digit. The most common barcode worldwide for retail products. Used in Europe, Asia, and most countries outside North America.
EAN-8
7 data digits + auto check digit. Compact version of EAN-13 for small products where space is limited (e.g. chewing gum, pens).
UPC-A
11 data digits + auto check digit. The standard barcode for retail products in North America. Every product sold in US/Canada stores has a UPC-A code.
UPC-E
6 data digits + auto check digit. Compressed version of UPC-A for very small products. Uses a special expansion algorithm internally.
EAN-2 & EAN-5
2 or 5 digit supplemental barcodes. Used as add-ons to EAN-13/UPC-A for magazines (issue number) and books (suggested retail price).
ISBN-13
13 digits starting with 978 or 979. International Standard Book Number used worldwide for books. Rendered as EAN-13 barcode with ISBN prefix.

Industrial & Logistics

Barcodes used in warehouses, shipping, manufacturing, and supply chain management.

Code 128
1-80 ASCII characters. The most versatile barcode - supports letters, numbers, and special characters. Used in shipping labels, inventory, and general purpose encoding.
Code 39 & Code 93
Uppercase A-Z, 0-9, and special characters. Code 39 is used by US Department of Defense and automotive industry. Code 93 is a more compact version.
ITF-14
13 data digits + auto check digit. Used for outer cartons and shipping containers. The thick bearer bars make it readable even on corrugated cardboard.
ITF (Interleaved 2 of 5)
Digits only, must be even count. Pairs of digits are interleaved for compact encoding. Common in warehouse and distribution applications.

Specialty

Barcodes designed for specific industries like healthcare, telecommunications, and inventory management.

Codabar
Digits, dashes, and special characters with A/B/C/D start/stop markers. Used in blood banks, photo labs, and library systems. The Range generator auto-adds start/stop characters.
MSI Plessey
Digits only, variable length. Used primarily for retail shelf marking and inventory control in supermarkets and warehouses.
Pharmacode
Integer value from 3 to 131,070. Designed specifically for pharmaceutical packaging. Encodes a single number used for automated sorting and verification.
Code 11, Plessey
Code 11: digits and dashes, used in telecommunications. Plessey: hexadecimal digits (0-9, A-F), used in UK libraries and retail.

Advanced & Postal

2D stacked barcodes and postal service formats for high-capacity data or mail sorting.

PDF417
Up to 2,710 ASCII characters. A stacked 2D barcode used in ID cards, driver's licenses, airline boarding passes, and shipping labels. Very high data capacity.
GS1 DataBar Stacked
13 data digits + auto check digit. Compact barcode for fresh food, coupons, and small items. Encodes GS1 Application Identifiers.
Royal Mail, USPS Postnet, USPS IMb
Postal barcodes for automated mail sorting. Royal Mail 4-State (UK), Postnet (US ZIP codes: 5, 9, or 11 digits), Intelligent Mail barcode (US: 20-31 digits).
Telepen
Full ASCII character set. Used in UK library systems for encoding alphanumeric data including lowercase letters and special characters.

Check digit calculation

Several barcode types include a check digit - an extra digit at the end that helps scanners detect errors. The tool calculates this digit automatically so you don't have to.

How it works (GS1 Mod-10 algorithm):

1. Starting from the rightmost digit, assign alternating weights of 3 and 1
2. Multiply each digit by its weight and sum all products
3. The check digit is (10 - (sum % 10)) % 10

Types with automatic check digit:

EAN-13 - enter 12 digits, check digit appended automatically
EAN-8 - enter 7 digits
UPC-A - enter 11 digits
UPC-E - enter 6 digits (special expansion algorithm, check digit calculated but not visually appended)
ITF-14 - enter 13 digits
GS1 DataBar Stacked - enter 13 digits

You only enter data digits
Never include the check digit yourself. The tool calculates and appends it automatically. If you enter a value that already includes a check digit, the barcode may render incorrectly.

Input modes

Single mode

Type or paste a single value into the input field. The barcode renders instantly in the live preview. Validation messages appear below the input showing character count and validity.

Batch mode

Paste multiple values separated by newlines (one per line). The tool automatically detects batch mode and shows a counter like "150/150 valid - Batch mode". A paginated grid preview shows all barcodes with visual indicators for valid (green) and invalid (red) entries.

CSV import

Click the Import CSV button to upload a .csv file. The tool supports comma, semicolon, and tab delimiters.

With header row: Include a value column. Other columns (name, SKU, description) are ignored.

CSV
value,name,sku
5901234123457,Product A,SKU-001
5901234123464,Product B,SKU-002
5901234123471,Product C,SKU-003

Without header: The first column of each row is used as the barcode value.

CSV
5901234123457
5901234123464
5901234123471
Drag & drop
You can also drag and drop a CSV file directly onto the page. A blue overlay will appear confirming the drop zone.

Serial range generator

The Range tab lets you generate sequential barcode values automatically. This is perfect for inventory labels, asset tags, serial numbers, and batch production.

Controls:

Prefix - text added before the number (e.g. SKU-)
Range - start and end numbers
Step - increment between values (default 1)
Suffix - text added after the number (e.g. -EU)
Padding - zero-padding (none, 3 digits, 4 digits, 6 digits)
Mask - pattern using # as digit placeholders (e.g. WH-####-B)

Example: Prefix SKU-, Range 1 to 100, Padding 4 digits generates:
SKU-0001, SKU-0002, SKU-0003, ... SKU-0100

Type-aware behavior

The range generator adapts automatically to the selected barcode type:

EAN-13, UPC-A, etc. - prefix/suffix hidden, padding locked to the required digit count
Codabar - auto-fills prefix A and suffix B (editable to A/B/C/D start/stop characters)
ISBN - prefix locked to 978 or 979, generates 12-digit values
Pharmacode - range clamped to 3-131,070, no zero padding
Postnet - length dropdown with 5, 9, or 11 digit options
USPS IMb - length dropdown with 20, 25, 29, or 31 digit options
ITF - only even-digit padding options shown

Preview before filling
The Preview line below the range controls shows the first generated value and total count before you click Fill Input. Check that the format matches your barcode type.

GS1 Application Identifiers

Click the GS1 button next to Import CSV to enable GS1 mode. This mode parses GS1-128 data strings with Application Identifiers (AI) - the industry standard for encoding product information in barcodes.

How to use:

1. Select Code 128 barcode type
2. Click the GS1 button to enable parsing mode
3. Enter a GS1 string like: (01)06141410000366(17)250101(10)ABC123
4. The tool validates each AI segment and shows a breakdown

Supported AIs include:

(01) GTIN - Global Trade Item Number
(10) Batch/Lot number
(17) Expiration date (YYMMDD)
(21) Serial number
(30) Count of items
(310x) Net weight in kg
And 30+ more identifiers for production dates, packaging, dimensions, routing codes, etc.

Use with Code 128
GS1 mode works best with Code 128 (GS1-128) barcodes. Other formats may not support the full AI syntax.

Customization

Colors

Use the Colors tab to change the bar color (foreground) and paper color (background). Enter hex values directly or use the color picker. Click the reset button to return to defaults (black bars on white background).

Size controls

The Size tab provides four sliders:

Bar width (1-4) - thickness of individual bars. Higher values make the barcode wider
Height (20-200 px) - vertical height of the barcode
Margin (0-30 px) - white space around the barcode (quiet zone)
Font size (8-24 px) - size of the human-readable text below the barcode

Text & Rotation

The Text tab lets you toggle the human-readable value display on/off and select barcode rotation: 0, 90, 180, or 270 degrees.

Quiet zone matters
Always keep some margin (quiet zone) around barcodes. Scanners need this blank space to detect the barcode edges. A minimum of 10px margin is recommended for reliable scanning.

Export options

Choose your download format based on your use case:

SVG
Vector format. Infinitely scalable, ideal for packaging design, signage, and professional print. Smallest file size.
PNG
Raster format with transparency. Use the DPI slider (72-600) to control resolution. 300 DPI is recommended for print.
JPG
Compressed raster format. Good for web use and email. White background (no transparency). DPI control available.
PDF
Document format for sharing and printing. In batch mode, generates a single PDF with all barcodes. Supports label sheet mode for Avery templates.
DOCX
Microsoft Word format. Barcodes embedded as images in a document. Supports grid and list layouts for batch mode.

Batch export: When exporting multiple barcodes as PNG, JPG, or SVG, they are packaged into a single ZIP archive. PDF and DOCX create a single document file.

Label sheet printing

Label sheet mode generates a print-ready PDF with barcodes arranged in a grid matching standard label sheets. This is available only for PDF format in batch mode.

How to use:

1. Enter multiple barcode values (batch mode)
2. Select PDF format
3. Check Label sheet mode
4. Select a template or choose Custom
5. Click Download

Pre-configured templates:

Avery 5160 - 30 labels per sheet (3 columns x 10 rows), US Letter size
Avery 5163 - 10 labels per sheet (2 columns x 5 rows), US Letter size
A4 24-up - 24 labels per sheet (3 columns x 8 rows), A4 size
A4 65-up - 65 labels per sheet (5 columns x 13 rows), A4 size

Custom template: Select "Custom" from the dropdown to define your own layout with page width/height, columns, rows, label dimensions, margins, and gaps - all in millimeters.

Vector quality
Barcodes in label sheets are rendered as vectors directly into the PDF - not rasterized images. This means they are crisp and scannable at any print resolution, from desktop printers to industrial label presses.

Presets & History

Style presets

Save your current color, size, and text settings as a named preset for quick reuse. Click the star icon above the preview, enter a name, and save. Load presets from the Preset Manager panel. Delete individual presets or clear all at once.

Generation history

The tool automatically saves your last 50 generated barcodes - including batch generations. If you generated 500 barcodes from a CSV or serial range, the entire batch is saved as one history entry. Click the clock icon above the preview to browse history. Each entry shows the barcode type, input value, batch count, and a mini preview. Click any entry to restore the full batch with all original settings and values.

Analytics dashboard

Scroll down to the Generation analytics section to see your usage statistics: total downloads, generated barcodes, most used type, favorite style, and batch exports. Reset stats anytime.

Scan to Verify

After printing barcodes, you can verify they scan correctly without leaving the tool.

How to use:

1. Generate a barcode and note the expected value
2. Click Scan to Verify
3. Choose one of two methods:
Camera - point your webcam at the printed barcode. A pulsing orange frame shows the scanning area
Upload image - upload a photo of the printed barcode

Results:

Green checkmark - barcode verified, scanned value matches expected value
Red X - mismatch detected, shows both expected and scanned values for comparison
Barcode icon - barcode detected (when no expected value was set)

FAQ

Answers to the most common questions about the Barcode Generator.

For retail products sold in stores: EAN-13 (worldwide) or UPC-A (North America). For shipping boxes: ITF-14. For general inventory and labels: Code 128 (most versatile). For books: ISBN-13. For pharmaceutical packaging: Pharmacode. For US mail: USPS Postnet or IMb.

No. For EAN-13, EAN-8, UPC-A, UPC-E, ITF-14, and GS1 DataBar, the check digit is calculated and appended automatically. Only enter your data digits. The tool shows you the complete value including the check digit in the preview.

Up to 9,999 barcodes per batch. This applies to both CSV import and serial range generation. For label sheet PDF export, the same 9,999 limit applies. The tool handles pagination automatically (e.g. 9,999 barcodes on Avery 5160 = 334 pages).

SVG is the best format for professional printing - it's vector-based and scales to any size without losing quality. For label sheets, use PDF with label sheet mode (also vector quality). For quick desktop printing, PNG at 300 DPI works well.

Common issues: (1) Too small - barcodes need minimum size for scanners to read. Increase the height and bar width. (2) No quiet zone - increase margin to at least 10px. (3) Low contrast - use dark bars on light background. (4) Wrong type - make sure your scanner supports the barcode format you're using.

Yes. Everything runs 100% in your browser using client-side JavaScript. No barcode data, CSV files, or images are ever sent to any server. History and presets are stored locally in your browser via IndexedDB. Close the tab and all session data is released.

Yes. Enter a pattern using # symbols for digit placeholders. For example, WH-####-EU with range 1 to 50 generates: WH-0001-EU, WH-0002-EU, ... WH-0050-EU. The number of # symbols controls zero-padding. When a mask is active, the prefix, suffix, and padding fields are automatically disabled.

GS1 mode parses GS1-128 data strings containing Application Identifiers (AI). These are standardized prefixes like (01) for GTIN, (17) for expiration date, (10) for batch number. The tool validates each AI segment, checks digit lengths, and verifies check digits. This is essential for retail supply chain, healthcare, and logistics barcodes.

Select "Custom" from the template dropdown. Enter your page dimensions (width and height in mm), number of columns and rows, label width and height, top and left margins, and horizontal/vertical gaps between labels. The tool validates that all labels fit on the page before generating. If dimensions are invalid, you'll see a warning notification.

JsBarcode (MIT license) for 17 standard barcode types. bwip-js for 6 advanced types (PDF417, GS1 DataBar, postal codes). jsPDF for PDF generation and label sheets. docx for DOCX export. JSZip for batch ZIP archives. Html5Qrcode (ZXing-based) for barcode verification/scanning. All libraries are lazy-loaded on first use.

Ready to generate barcodes?

Start now with our free barcode generator - 23 types, batch export, label sheets and more.

Open Barcode Generator

Documentation