🚀 200+ Free Tools — No Signup Required!

Barcode Generator

QR & Barcode ✓ 100% Free ⚡ No Signup

Generate barcodes in various formats.

Barcode Generator

Ready
Code 128: accepts any ASCII characters
80px
2x
10
Barcode appears here

Barcode generated locally in your browser — no data sent

What is a Barcode Generator?

A barcode generator creates machine-readable linear barcodes from text or numeric data. Unlike QR codes (which are two-dimensional), traditional barcodes encode information in a single row of bars and spaces of varying widths. The Toolsiro Barcode Generator supports eight of the most widely used barcode formats, with live validation that tells you instantly if your input is valid for the selected format. All processing happens in your browser using the JsBarcode library — no uploads, no server calls.

Eight Barcode Formats — Which to Use

  • Code 128: The most versatile barcode format. Encodes all 128 ASCII characters — letters, numbers, and symbols — with high data density. The go-to choice for logistics, shipping labels, inventory management, and any application requiring alphanumeric data. Supported by virtually every barcode scanner in the world.
  • Code 39: An older but widely supported format. Encodes uppercase A–Z, digits 0–9, and a small set of special characters (space, -, ., $, /, +, %). Lower data density than Code 128 but extremely well-supported in industrial environments, government documents, and healthcare. Often used for ID cards and military applications.
  • EAN-13: The international retail standard, used on virtually every consumer product sold outside the United States. Encodes exactly 13 digits: a 2–3 digit country/publisher code, a manufacturer code, a product code, and a check digit (automatically calculated). Required for products sold through major retailers and online marketplaces in Europe, Asia, and elsewhere.
  • EAN-8: A shorter version of EAN-13 for small products where there isn't enough space for a full EAN-13 barcode. Encodes 7 digits (plus 1 check digit auto-calculated). Used on chewing gum packs, small cosmetic items, and other small packages.
  • UPC-A: The North American retail standard (similar to EAN-13). Used on consumer products sold in the United States and Canada. Encodes 11 digits (plus 1 check digit auto-calculated). If you're selling products in the US, you need UPC; for international sales, use EAN-13.
  • ITF-14: Used for outer cartons, shipping containers, and logistics. Encodes the GTIN-14 standard (13 digits + 1 check digit). Often printed directly on corrugated boxes. Required by many major retailers for case-level scanning in warehouses.
  • MSI (Modified Plessey): Used primarily in warehouse inventory, library systems, and retail shelf labelling. Encodes digits 0–9 only. Less common than Code 128 but still used in specific legacy inventory management systems.
  • Pharmacode: A pharmaceutical-specific format used on drug packaging to encode a product number (3–131070). Extremely simple — encodes only a single number — but highly reliable and used across the global pharmaceutical industry for medication verification.

Barcode vs QR Code — When to Use Each

Both barcodes and QR codes encode data in a scannable format, but they serve different purposes:

  • Use a barcode when: you're working with existing retail or logistics infrastructure that already uses specific barcode formats (EAN, UPC, Code 128); when the scanner is a dedicated 1D laser scanner (common in warehouses and retail); or when your industry has a specific standard format.
  • Use a QR code when: you need to encode more data (URLs, contact info, WiFi credentials); when the scanner is a smartphone camera; or when the code will be displayed on a screen rather than a label.

Barcode Size — Height, Width, and Margin Settings

The Toolsiro Barcode Generator offers precise control over barcode dimensions:

  • Height: Taller barcodes are easier to scan because the scanner can capture a wider reading area. For retail and shipping labels, a height of 60–80px at screen resolution (typically equivalent to 10–15mm on a label) is standard. For handheld scanning from close range, even 40px works fine.
  • Width (bar width): Controls how wide each individual bar module is. Higher values make a wider, more scannable barcode. A width of 2x is standard for most applications. Very narrow barcodes (1x) may fail to scan on lower-resolution scanners.
  • Margin (quiet zone): The blank white space around the barcode is called the "quiet zone" and is not decorative — it's required by the barcode standard. Scanners use the quiet zone to detect where the barcode starts and ends. Never reduce the margin to zero for barcodes that will actually be scanned.

SVG vs PNG — Best Format for Barcodes

For barcodes, SVG is almost always the better choice:

  • SVG (recommended): Vector format. Scales to any size without pixelation. A barcode SVG printed at 10mm and the same SVG printed at 50mm will both have perfectly sharp edges. Essential for professional printing on labels, boxes, and stickers. Import directly into design tools like Adobe Illustrator, Figma, or InDesign.
  • PNG: Acceptable for low-stakes uses like internal documents or test prints. Can look blurry when scaled up. Use the PNG if your workflow requires a raster format.

Related Tools

The Barcode Generator is part of Toolsiro's QR and barcode tools collection. For 2D codes that smartphones can scan, use the QR Code Generator. To decode an existing barcode or QR code from an image, use the QR Code Reader.

Frequently Asked Questions

Yes, Barcode Generator is completely free with no signup required. Use it unlimited times.
Absolutely. All processing happens in your browser. No data is sent to or stored on our servers.
Yes, it works on all devices — smartphones, tablets, and desktops.
No, Barcode Generator runs entirely in your browser. No installation needed.