Skip to content

Barcode Generator

Type a value, pick a barcode format, and get a scannable barcode as a downloadable PNG — with the actual format rules enforced (EAN-13 needs exactly 12-13 digits with a valid check digit, UPC-A needs 11-12) instead of silently generating an unscannable barcode from invalid input.

  • CODE128, EAN-13, UPC-A and CODE39
  • Format-specific validation, not silent failure
  • Downloadable PNG
  • Runs fully client-side

Generator

Generated locally, nothing uploaded

How to generate a barcode

  1. 01

    Pick a format

    CODE128 accepts almost any text; EAN-13, UPC-A and CODE39 have specific rules — see the guide below.

  2. 02

    Type the value

    The barcode renders instantly, or shows a clear error if the value does not fit the format.

  3. 03

    Download the PNG

    Ready to print or embed.

Why the format matters, not just the numbers#

A barcode format is not just a visual style — it is a specific encoding scheme with its own rules about what input is even valid. EAN-13, the format on most retail products, encodes exactly 13 digits, the last of which is a checksum computed from the other twelve; feeding it 10 digits or a value with an invalid check digit does not produce a barcode that scans as anything sensible. CODE128, by contrast, is much more permissive and can encode nearly any text or number, which is why it is the reasonable default when there is no specific standard to follow.

What each format actually expects#

EAN-13 needs 12 or 13 digits (the 13th, the check digit, is calculated automatically if left off). UPC-A needs 11 or 12 digits, following the same check-digit logic used across North American retail. CODE39 supports uppercase letters, digits, and a small set of symbols, commonly used in logistics and asset tagging. CODE128 is the most flexible of the four and the right choice whenever the destination system does not require one of the more specific retail standards.

Why an invalid value gets rejected instead of drawing something anyway#

A barcode that renders but does not actually decode back to the intended value is worse than an error message — it looks correct until someone tries to scan it. This tool validates the input against the selected format's real rules before drawing anything, so a mismatched value produces a clear explanation instead of a barcode that silently fails at the register or the warehouse scanner.

Frequently asked questions

Which format should I use?

CODE128 for general-purpose use — it accepts almost any text. EAN-13 or UPC-A specifically for retail products following those standards, and CODE39 for logistics or asset-tagging contexts that expect it.

Why did my EAN-13 barcode get rejected?

EAN-13 requires exactly 12 or 13 digits, with the 13th being a checksum calculated from the rest. A different digit count or an invalid check digit is rejected before anything is drawn, since a barcode that looks right but does not scan correctly is worse than an error.

Can I use letters in a barcode?

CODE128 and CODE39 both support letters; EAN-13 and UPC-A are digits-only, since those are numeric retail identification standards.

Is my data sent anywhere?

No. The barcode is drawn entirely in your browser — nothing is uploaded.

Developers

UUID Generator

Generate cryptographically random UUID v4 or time-ordered UUID v7, in bulk.

Developers

Base64 Encoder & Decoder

Encode and decode Base64 with correct UTF-8 handling, including the URL-safe alphabet.

Developers

ULID Generator

Generate ULIDs — sortable by creation time like UUID v7, but Crockford Base32 instead of hex.