No upload, 100% local, no account

Barcode Generator

Generate an EAN-13 or Code 128 barcode from text or digits.

How Barcode Generator works

The Barcode Generator turns text or digits into a scannable barcode, computed and drawn entirely in your browser as SVG, then optionally exported as PNG. Two symbologies are supported: EAN-13, the standard retail product barcode (enter 12 digits and the check digit is computed and appended automatically), and Code 128, which encodes any printable ASCII text (letters, digits and punctuation) and is common on shipping labels and inventory tags.

Only these two symbologies are implemented, on purpose: they cover the large majority of real barcode needs without pulling in a broad barcode library. For 2D codes such as QR, use /qr-code instead; other 1D symbologies like UPC-A or Code 39 are out of scope here.

How to use Barcode Generator, step by step

  1. Pick a symbology: EAN-13 for a 12-digit product code, or Code 128 for arbitrary text.
  2. Type your 12 digits (EAN-13) or your text (Code 128); the barcode preview updates live.
  3. Check the human-readable text under the bars matches what you expect, including the computed EAN-13 check digit.
  4. Download the barcode as SVG (vector, scales to any size) or PNG (raster, fixed size).

Common use cases

  • Generating an EAN-13 barcode for a product listing or a small batch of labels from a known product code.
  • Creating a Code 128 barcode to encode an internal reference, inventory tag or shipping identifier.
  • Getting a scalable SVG barcode to place inside a print layout without pixelation at any print size.

Frequently asked questions

How is the EAN-13 check digit computed?

You enter the 12-digit payload; the tool sums the digits with alternating weights of 1 and 3 and computes the digit that rounds the total up to the next multiple of 10, exactly as the GS1 EAN-13 standard defines it, then appends it as the 13th digit.

What characters can Code 128 encode?

Any printable ASCII character: uppercase and lowercase letters, digits and standard punctuation (ASCII codes 32 to 126). Characters outside that range, such as accented letters or emoji, are not supported by this Code 128 mode.

Will a barcode reader actually scan this?

Yes. The bar widths follow the published EAN-13 and Code 128 specifications, including the correct start, checksum and stop patterns, so a standard barcode scanner or a phone barcode-scanning app reads it the same way it would read a printed retail barcode.

Can I generate a QR code or a UPC-A barcode here?

Not with this tool. Use /qr-code for 2D QR codes. UPC-A, Code 39 and other 1D symbologies are not implemented here; only EAN-13 and Code 128 are supported.

Is the value I type sent anywhere?

No. The barcode is computed and rendered as SVG entirely with JavaScript in your browser tab, and the PNG export is generated locally too. Nothing you type is sent to a server.