CodeKitHub
English
Generator Tools

Free Barcode Generator

Type or paste a value and get a scannable barcode instantly — pick CODE128 for general text, EAN-13 or UPC-A for retail products, or CODE39 for warehouse and inventory labels. The barcode updates live as you type, and you can download a clean PNG for labels, packaging or inventory sheets.

The barcode updates live as you type — generated entirely in your browser.

What Is This Tool?

A barcode is a machine-readable pattern of parallel bars that encodes a short string of text or digits. Unlike a QR code, most barcode formats are one-dimensional and were designed decades ago for retail scanners, so they remain the standard for product packaging, shipping labels and inventory systems.

This generator runs the encoding logic entirely in your browser using the widely used JsBarcode library, so your data is never uploaded — useful when you're generating barcodes for internal SKUs or unreleased products.

Why Use It?

  • Four common formats in one tool: CODE128 for general-purpose text, EAN-13 and UPC-A for retail products, CODE39 for warehouse labels.
  • Live preview updates as you type or change options.
  • Adjustable line width, height and color to match your label template.
  • Clear validation errors — if a format's rules aren't met (e.g. EAN-13 needs a valid 12/13-digit check digit), you're told exactly why.
  • Private: barcode values are generated locally, nothing is sent to a server.

How to Use

  1. Pick a format that matches your use case: CODE128 for mixed text, EAN-13/UPC-A for retail products, CODE39 for internal labels.
  2. Type the value to encode — digits only for EAN-13/UPC-A, letters and digits for CODE128/CODE39.
  3. Adjust line width, height and color if needed, and toggle whether the human-readable text appears under the bars.
  4. Click "Download PNG" and print or paste the barcode into your label design.

Example

Input

123456789012 (format: UPC-A)

Output

A scannable UPC-A barcode with the check digit computed automatically and the number printed underneath the bars.

EAN-13 and UPC-A validate the check digit — if you type a number that doesn't check out, the tool tells you rather than producing a barcode that won't scan.

Choosing between CODE128, EAN-13, UPC-A and CODE39

FormatContentTypical use
CODE128Any letters, digits, symbolsShipping labels, logistics, general-purpose
EAN-1312–13 digitsRetail products sold internationally
UPC-A11–12 digitsRetail products sold in the US/Canada
CODE39Uppercase letters, digits, - . $ / + % spaceWarehouse labels, ID badges, older scanner systems

Barcodes vs. QR codes

Barcodes are one-dimensional and hold far less data than a QR code — typically a short product number rather than a URL. They're the right choice when you need compatibility with decades-old retail scanning infrastructure or a specific product-identification standard like EAN/UPC.

For linking to a website, Wi-Fi network or larger blocks of text, a QR code is the better fit since it can hold thousands of characters and is readable by any phone camera.

QR Code Generator · UUID Generator

Frequently Asked Questions

Which barcode format should I use?

CODE128 is the most flexible — it encodes any ASCII text and is used for shipping and logistics labels. EAN-13 is the standard for retail products sold internationally; UPC-A is its US/Canada equivalent (12 digits). CODE39 is older and simpler, common in warehouses and ID badges, but less compact than CODE128.

Why does EAN-13 or UPC-A reject my number?

Both formats end in a check digit computed from the preceding digits. EAN-13 needs exactly 12 digits (the tool adds the check digit) or 13 digits (the 13th must already be the correct check digit). UPC-A works the same way with 11 or 12 digits. If you typed a real product's barcode number, double-check you copied all the digits.

Can I use these barcodes commercially, e.g. for products I sell?

The barcode symbology itself (CODE128, EAN-13, etc.) is an open standard with no licensing fee to render one. However, to sell a physical product in retail stores under a real EAN/UPC number, you typically need to register that number with GS1 — this tool renders the visual barcode but doesn't allocate you a globally unique product number.

What size should I print a barcode at?

Retail scanners are tuned for roughly 3–8 cm wide EAN-13/UPC-A codes at 100% scale — shrinking below about 80% often makes the bars too thin to scan reliably. For CODE128 warehouse labels, follow your label template's spec, and always test-scan a printed sample before printing a full batch.

Does this store or transmit the values I encode?

No. The barcode is rendered on a canvas element directly in your browser using JavaScript — nothing is uploaded, logged, or sent anywhere.

Related Tools