Barcode Generator

Generate high-precision, scannable 1D barcodes in seconds directly in your browser. Whether you need standard Code 128 shipping labels, retail EAN-13 and UPC-A product codes, industrial Code 39 asset tags, or ITF-14 master carton symbols, this free tool calculates check digits automatically and renders crisp vector SVGs and high-resolution PNGs. Everything runs client-side with zero data uploaded.

Free tool · 100% client-side · zero dependencies

Generate & verify barcodes

Instant client-side barcode generation for Code 128, EAN-13, UPC-A, Code 39, ITF-14, and Codabar with auto-checksum calculation and vector export.

  • Client-side only
  • Auto checksum
  • ISO & GS1 standards
  • Vector SVG & PNG

Barcode data & format

Quickly populate verified real-world barcodes for logistics, retail, or warehouse management.

Code 128 accepts all printable ASCII characters. Characters: 11

Verification & render

100 Grade A

VALID & READY

Ready for high-speed scanning

All check digits, quiet zones, and character encodings comply with ISO/IEC standards.

  • Total Modules 142
  • Checksum Mod 103: 47
  • Quiet Zone 20 px (≥10X)
  • X-Dimension 2.0 px (Norm)

Barcode diagnostics & print specifications

Checksum verification Modulo-103 check character calculated and encoded according to ISO/IEC 15417.
Character set compliance All input characters belong to the supported standard character repertoire.
Quiet zone margin (≥10× X-Dim) Unbroken solid white margins prevent false triggers from surrounding typography or packaging.
Aspect ratio & scan aperture Height meets ANSI/GS1 recommendations for omnidirectional laser and imaging scanners.

The Definitive Guide to Barcode Generation & 1D Symbologies

Barcodes remain the backbone of global commerce, warehousing, logistics, and healthcare. Over five billion barcodes are scanned daily worldwide, enabling real-time stock replenishment, automated conveyor sortation, point-of-sale checkout, and positive patient identification. While 2D matrix codes like QR codes have gained popularity for mobile marketing, linear 1D barcodes remain the undisputed standard for rapid, high-speed optical scanning because single-line laser scanners and industrial fixed-mount imagers decode linear barcodes with zero autofocus latency.

Generating a barcode that looks correct on screen is simple; generating a barcode that scans reliably across every commercial scanner in the field requires strict adherence to mathematical encoding tables, official check digit formulas, quiet zone tolerances, and optical contrast ratios. This guide covers the engineering principles behind standard 1D barcode symbologies, how to select the right format for your application, and how to print barcodes that scan on the first pass every time.

Symbology Comparison: Choosing the Right Barcode Standard

Different industries mandate distinct barcode symbologies based on data density, character support, and scanner capabilities. The table below outlines the six dominant linear barcode formats supported by this tool:

Symbology Supported Characters Data Length Checksum Formula Primary Industry & Applications
Code 128 Full 128 ASCII (Alphanumeric, symbols, control codes) Variable (High density) Modulo 103 Amazon FBA, logistics shipping labels (GS1-128), carton tracking, serial numbers
EAN-13 Numeric only (0–9) Fixed 13 digits (12 data + 1 check) Modulo 10 (Weight 1, 3) Worldwide consumer retail packaging, supermarkets, books (ISBN-13)
UPC-A Numeric only (0–9) Fixed 12 digits (11 data + 1 check) Modulo 10 (Weight 3, 1) North American point-of-sale retail products (US & Canada)
Code 39 A–Z, 0–9, and 7 symbols (- . $ / + % space) Variable (Moderate density) Optional Modulo 43 Defense (MIL-STD-129), automotive parts, manufacturing, government asset tagging
ITF-14 Numeric only (0–9) Fixed 14 digits (Interleaved 2 of 5) Modulo 10 (Weight 3, 1) Master shipping containers, corrugated cardboard boxes, warehouse pallets
Codabar 0–9, 6 symbols (- $ : / . +), A–D delimiters Variable Self-checking parity Blood banks, medical pathology laboratories, libraries, FedEx airbills

Anatomy of a Linear Barcode: Critical Engineering Elements

Every commercial 1D barcode consists of four functional geometric regions that laser and optical scanners inspect sequentially:

  1. Quiet Zones: The solid white, unprinted margins preceding the start pattern and following the stop pattern. For Code 128 and Code 39, the quiet zone must measure at least 10 times the width of the narrowest bar (10× X-Dimension). For EAN-13 and UPC-A, quiet zones require at least 9 to 11 module widths. Truncating the quiet zone is the number one cause of barcode scanner failure because the scanner's photodetector cannot establish baseline ambient reflectance before encountering data bars.
  2. Start and Stop Patterns: Unique bar-and-space sequences positioned at the leading and trailing edges of the symbol. These delimiters inform the scanner of the symbology family, the orientation of the scan line (allowing bidirectional scanning from left-to-right or right-to-left), and where data begins and ends.
  3. Data Bars & Character Modules: The alternating dark bars and light spaces that encode the payload characters. In modular symbologies like Code 128 and EAN-13, every character is constructed from fixed-width modules (for example, 11 modules per Code 128 symbol, with 3 bars and 3 spaces of varying thicknesses).
  4. Check Digit (Checksum): A mathematically calculated symbol appended immediately before the stop character. When the scanner sweeps across the bars, its internal microprocessor re-runs the mathematical checksum formula on the decoded data. If the calculated checksum does not match the check digit scanned, the read is rejected instantly, preventing catastrophic data entry errors.

How Checksum Algorithms Guarantee Zero Scan Errors

Optical scanners operate in noisy environments where smudged ink, scratches, wrinkled labels, or thermal printhead dropouts could distort individual bar widths. Checksum algorithms ensure that damaged bars never produce accidental wrong numbers.

1. Modulo 103 for Code 128

Code 128 uses a weighted modulo-103 check character. The start character has a weight of 1, and each subsequent data character is multiplied by its 1-based sequential position in the string. The sum of all weighted values is calculated modulo 103:

Checksum = (StartCode + ∑(Position × CharacterValue)) mod 103

Because the position is factored into the weight, transposing two characters (such as typing 1234 instead of 1324) generates completely different checksums, catching 100% of single-digit errors and character transposition errors.

2. Modulo 10 (3:1 Weighting) for EAN-13, UPC-A, and ITF-14

GS1 retail standards (EAN-13, UPC-A, and ITF-14) utilize alternating weights of 1 and 3 across consecutive digits, ensuring that any single misread digit causes the overall sum modulo 10 to mismatch. This tool automatically checks your input against the official GS1 Modulo-10 formula. If you enter 12 digits for EAN-13 or 11 digits for UPC-A, the missing check digit is automatically generated for you. If an incorrect check digit is supplied, our tool detects the discrepancy, repairs it, and flags the correction so your printed packaging passes GS1 barcode verification audits.

Best Practices for Printing Barcodes That Always Scan

A barcode that renders cleanly on a 4K computer monitor can still fail on a warehouse thermal printer if print parameters are ignored. Follow these practical manufacturing rules:

  • Use Vector SVG for Commercial Packaging: When designing retail product boxes, labels, or book covers in Adobe Illustrator, InDesign, or CorelDRAW, always export your barcode as a vector SVG. Unlike bitmap raster graphics, vector SVGs have mathematically precise edges that never pixelate, bleed, or blur regardless of plate resolution.
  • Align Bar Widths with Printer DPI: Thermal transfer and direct thermal label printers (such as Zebra, TSC, and Brother) print at fixed resolutions, typically 203 DPI, 300 DPI, or 600 DPI. Always scale your barcode modules to integer pixel multiples (e.g. 2px, 3px, or 4px) rather than fractional numbers like 2.35px. Fractional scaling causes the printer driver to dither adjacent dots, creating uneven bar widths known as "bar edge jitter" that degrade scanner decodability.
  • Ensure High Optical Contrast: Barcode scanners rely on red LED or laser light (typically 660 nm wavelength). To a scanner, red ink appears white. Therefore, always print dark bars (black, dark navy) on a pure white, matte background. Never print red bars on white, or black bars on green or red packaging.
  • Preserve the Bar Height: Never compress the vertical height of a barcode to save label space. Handheld gun scanners require adequate vertical aperture so the red scan line can cross the entire barcode even when aimed at an angle. For shipping labels, maintain a minimum bar height of 32 mm (1.25 inches).
  • Watch for Corrugated Bleed on ITF-14 Cartons: ITF-14 symbols feature thick horizontal "bearer bars" across the top and bottom. These bars serve a dual purpose: they equalize the plate pressure of flexographic printing presses on rough corrugated shipping cartons and prevent a partial scan if the beam drifts off the edge of the carton.

Frequently Asked Questions

Do I need to buy official UPC or EAN numbers from GS1?

If you intend to sell physical products through major retail stores (such as Walmart, Target, Kroger, or Tesco) or e-commerce marketplaces (including Amazon, eBay, and Google Shopping), you must obtain official GS1 Company Prefixes directly from GS1 (GS1 US, GS1 UK, etc.). Third-party barcode re-sellers frequently sell recycled numbers that can cause brand collisions or listing rejections on Amazon. However, for internal warehouse inventory, asset tagging, member ID cards, or private point-of-sale systems, you can generate your own Code 128 or Code 39 barcodes for free without registering with GS1.

What is the difference between Code 128 and Code 39?

Code 128 is a modern, high-density symbology that supports all 128 ASCII characters (including lowercase letters and control characters) and uses four distinct element widths to compress data into a compact footprint. Code 39 is an older standard that uses only two element widths (wide and narrow). While Code 39 is still widely mandated in aerospace, defense (MIL-STD-129), and automotive manufacturing, it consumes nearly twice as much horizontal label width as Code 128 for the same alphanumeric payload.

Can a standard 1D barcode scanner read QR codes?

No. Traditional linear laser scanners use an oscillating mirror that casts a single line of laser light across the surface. They can only read 1D linear barcodes. Reading 2D matrix codes like QR codes or Data Matrix requires an area imager equipped with a CMOS camera sensor. If your operational hardware consists of legacy laser gun scanners, you must deploy 1D barcodes like Code 128.

Why does my scanner beep with an error on EAN-13 or UPC-A?

Barcode scanners will reject EAN-13 or UPC-A codes if the final check digit does not mathematically correspond to the preceding data digits according to the GS1 Modulo-10 algorithm. Another frequent reason is truncated quiet zones; if surrounding product artwork, graphics, or borders encroach within 3.5 mm of either side of the barcode, the scanner will fail to detect the start/stop guard bars.

Are barcodes generated by this tool 100% private?

Yes. All barcode calculations, binary pattern conversions, and vector SVG renderings happen entirely within your local web browser engine using vanilla client-side JavaScript. No numbers, strings, or images are ever transmitted to an external server or stored in cookies, making this tool completely secure for proprietary serial numbers, internal employee badges, and confidential tracking codes.