Image & Media

Barcode Generator

Generate Code 128, EAN-13, EAN-8, UPC-A, Code 39, and ITF-14 barcodes, with automatic check-digit calculation. Runs entirely in your browser.

Barcode Type
Text to Encode

Any text — letters, digits, and most symbols.

Enter text to encode to generate a barcode.

Quick Learn

A barcode encodes text as a pattern of bars and spaces, using a scheme (a "symbology") that defines exactly how each character maps to a bar pattern. Different symbologies exist for different jobs: Code 128 is a general-purpose symbology that can encode almost any text, while EAN-13, EAN-8, and UPC-A are the retail symbologies printed on product packaging worldwide, built around a fixed digit count and a check digit that lets a scanner catch a misread.

That check digit is computed from the other digits using a fixed formula — this tool adds it automatically when you provide one digit fewer than the format needs, the same way most retail systems generate a new product barcode. Everything is drawn to a canvas entirely in your browser; nothing you type is sent anywhere.

Best Practices

  • •Use Code 128 for anything that isn't a retail product — it accepts almost any text and doesn't require a specific digit count or check digit.
  • •For EAN-13/EAN-8/UPC-A, enter one digit fewer than the full length (12 for EAN-13, 7 for EAN-8, 11 for UPC-A) and let this tool compute the check digit — hand-calculating it is easy to get wrong.
  • •Keep bar color dark and background light for reliable scanning, the same principle as QR codes — a low-contrast or inverted barcode can fail to scan even though it renders fine on screen.
  • •Test a printed barcode with an actual scanner or phone camera app before relying on it at scale — screen rendering doesn't guarantee real-world scan reliability at a given print size.

More Image & Media Tools

See all Image & Media tools

Frequently Asked Questions

Is my text uploaded anywhere?

No. The barcode is drawn entirely in your browser onto a canvas element — nothing you type is sent to a server or stored anywhere.

Why does it say my text isn't valid for this format?

Formats like EAN-13, EAN-8, UPC-A, and ITF-14 require an exact digit count (with an optional check digit) — anything else, including letters or the wrong number of digits, is rejected. The hint under the text field shows the exact rule for the format you've selected.

What's the difference between Code 128 and the retail formats (EAN/UPC)?

Code 128 is general-purpose — it can encode almost any text and is common in shipping, logistics, and internal inventory systems. EAN-13, EAN-8, and UPC-A are retail-specific standards with a fixed digit count and check digit, used on product packaging so any scanner worldwide can read them consistently.

How is the check digit calculated?

Each retail symbology defines its own formula (a weighted sum of the digits, modulo 10) to compute a check digit from the rest of the number. Rather than requiring you to calculate it, this tool computes it automatically when you provide the number without it.

Can Code 39 encode lowercase letters?

Code 39's standard character set is uppercase-only, so lowercase letters you type are automatically converted to uppercase before encoding — the barcode itself only ever represents uppercase text.

Can I make a barcode from a link or URL?

Yes — choose Code 128 and paste the URL; it encodes any text, including links. Long URLs make a very wide barcode that is hard to scan, though, and phone cameras read QR codes far more easily, so for a link that people will scan with a phone, the QR Code Generator is usually the better choice.

How do I turn a number into a barcode?

Pick the format that matches how the number will be used. For a retail product number, use EAN-13 (12 or 13 digits) or UPC-A (11 or 12 digits) — leave the last check digit off and it is calculated for you. For an internal number such as an order or asset ID, Code 128 accepts digits and letters without a fixed length.

Can I download the barcode as an image?

Yes. Download it as a PNG, or copy the image straight to your clipboard to paste into a document or label design. You can change the bar and background colours before downloading — keep strong contrast, such as dark bars on a light background, so scanners can read it.

Want the engineering deep-dives behind tools like this one?