Skip to content
Everyday Utilities Free · No signup · Private · Instant results

Barcode Generator

Generate Code 128, EAN-13, UPC-A barcodes as PNG/SVG.

About the Barcode Generator

This Barcode Generator renders linear (1D) barcodes via the public bwipjs-api.metafloor.com endpoint, which runs the Barcode Writer in Pure JavaScript (bwip-js) library server-side. It supports the most common retail and industrial symbologies: Code 128, Code 39, EAN-13, UPC-A, ITF-14, and Codabar.

Code 128 (ISO/IEC 15417) is the workhorse for shipping labels, packaging barcodes, and warehouse inventory because it encodes all 128 ASCII characters at high density — about 1 character per 11 modules. EAN-13 (ISO/IEC 15420) is the 13-digit retail barcode used on every product sold in Europe and most of the world outside North America. UPC-A is the 12-digit equivalent used in the US and Canada. ITF-14 is the Interleaved 2-of-5 variant used on outer cartons and logistics labels.

Each symbology has strict input rules: EAN-13 requires exactly 12 or 13 digits, UPC-A requires 11 or 12, and Code 39 supports only the 43 characters A-Z 0-9 - . $ / + % space. The tool validates input before requesting the render so you see a friendly error rather than a broken image.

How It Works

The tool builds a URL of the form https://bwipjs-api.metafloor.com/?bcid=code128&text=...&scale=2&height=60&includetext=1. The bcid parameter selects the symbology, text is the URL-encoded payload, scale controls pixels per module (each bar or space is one module wide), and height sets the bar height in pixels. The server returns a PNG image that the browser loads directly.

Each symbology has its own encoding rules. Code 128 uses three sub-codesets (A, B, C) selected automatically by the encoder to maximize density: code set C packs two digits per module pair, so pure-numeric payloads compress to roughly half the width of code set A or B. The start, check, and stop characters are added automatically by the encoder.

EAN-13 and UPC-A both compute a Modulo-10 check digit over the first 12 or 11 digits respectively. If you supply only 12 digits for EAN-13, the encoder computes and appends the check digit; if you supply 13, the encoder verifies the existing check digit and rejects the input on mismatch. ITF-14 uses the same Modulo-10 algorithm over 13 digits.

Code 39 self-checks via a modulo-43 check character appended to the payload — this is optional but recommended for industrial use. Codabar is the oldest of the supported symbologies and uses start/stop characters (A, B, C, or D) to delimit the payload; libraries and US blood banks still use it for legacy compatibility.

Worked Examples

Encode HT99-TOOLS-2024 as Code 128 at scale 2, height 60 px, with text shown. Output is roughly 350 px wide and 60 px tall — prints cleanly at 2 cm wide on a 300 DPI label printer. Code 128 is the recommended symbology for any non-numeric or mixed alphanumeric payload.

Encode 4006381333931 as EAN-13. The first 3 digits (400–440) are the GS1 country prefix for Germany, the next 9 digits identify the manufacturer and product, and the final 1 is the Modulo-10 check digit verifying the prior 12.

Encode 036000291452 as UPC-A — the classic Gillette Foamy barcode used in countless OCR training datasets. The leading 0 identifies the US/Canada country code, the next 5 are the manufacturer ID, the next 5 are the product code, and the final 2 is the check digit.

When to Use This Tool

  • Printing inventory labels for warehouse stock using Code 128 with a SKU prefix.
  • Generating EAN-13 barcodes for retail products sold in Europe and Asia.
  • Creating UPC-A labels for products distributed in the US and Canada.
  • Producing ITF-14 carton labels for logistics and shipping.
  • Generating Codabar labels for library book tracking or blood bank samples.
  • Creating asset tags for office equipment using Code 39.
  • Testing barcode scanners with known-good reference images during development.

Limitations & Disclaimer

This tool renders barcodes via the public bwipjs-api.metafloor.com endpoint, which means the data you encode is transmitted to a third-party server. Do not use it for sensitive payloads; render locally with bwip-js or python-barcode instead. EAN-13, UPC-A, and ITF-14 numbers used on retail products must be registered with GS1 — generating barcodes with unregistered numbers will fail at retail POS systems. Modulo-10 check digits catch single-digit errors but not all transpositions; for high-reliability applications use a symbology with a stronger check character (Code 128 with explicit checksum). See our disclaimer for full terms.

Frequently Asked Questions

Which symbology should I use for a shipping label?

Code 128 (ISO/IEC 15417). It supports full ASCII, has high density (1 char per 11 modules), and is the GS1-128 standard for shipping container codes when combined with Application Identifiers. Avoid Code 39 for new deployments — it is lower density and lacks the automatic code-set switching that makes Code 128 efficient for mixed alphanumeric data.

How do I get an EAN-13 or UPC-A number for my product?

You must register with your local GS1 member organization (GS1 US, GS1 UK, etc.) and purchase a company prefix. The prefix plus your assigned product number plus a Modulo-10 check digit forms a globally unique 13-digit (EAN-13) or 12-digit (UPC-A) barcode. Generating a barcode without a registered prefix is fine for internal use but cannot be sold at retail.

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

UPC-A is the 12-digit US/Canada retail barcode. EAN-13 is the 13-digit global equivalent. A UPC-A barcode prefixed with a leading 0 is a valid EAN-13. Modern POS scanners in the US read both formats interchangeably; retailers outside North America expect EAN-13.

What is the Modulo-10 check digit algorithm?

For EAN-13 and UPC-A: starting from the rightmost digit of the 12- or 11-digit payload, weight odd positions by 3 and even positions by 1, sum the products, and the check digit is <code>(10 - sum mod 10) mod 10</code>. The algorithm is defined in ISO/IEC 15420 and catches all single-digit errors and most transposition errors.

Why does my barcode not scan?

Common causes: quiet zone (white space around the bars) too narrow (minimum 10 modules wide on each side), bar height too short for the scanner&rsquo;s laser sweep angle, contrast too low (use pure black on white), or the barcode is scaled down below the scanner&rsquo;s minimum module width. Increase the scale or height and reprint.

Are the barcodes stored on the server?

The PNG is rendered server-side by bwipjs-api.metafloor.com. The data you encode is transmitted to that service. For sensitive data, render the barcode locally with a library like <code>bwip-js</code> (browser) or <code>python-barcode</code> (Python). The output format is PNG.

Last updated: September 9, 2026  ·  Author: HT99 Tools Editorial Team