100% free · No login · No subscription · No installation

Barcode Generator

Generate scannable barcodes and export PNG or SVG — 100% free.

Category: Generators

Barcode

Encoded, previewed and exported entirely in your browser.

Enter a value to generate a barcode.

How to use this generator

  1. Pick a format. Retail formats (EAN-13, EAN-8, UPC-A) accept digits only and verify the check digit for you.
  2. Type the value, then adjust bar width, height and colors if needed.
  3. The preview renders instantly. Use Download SVG for lossless print work or Download PNG for documents and UI mockups, then test the file with a scanner.

About this tool

This generator encodes five common linear barcode symbologies entirely in your browser. Code 128 supports the full printable ASCII range and automatically uses the compact Code set C for numeric values. Code 39 covers the classic alphanumeric industrial set. EAN-13, EAN-8 and UPC-A are the retail formats: they follow the standard guard, center and parity layout, and their check digit is calculated (or verified) with the published modulo-10 rule.

The exported SVG keeps clean bar rectangles with correct quiet zones, so it scales without blur for print. Nothing leaves the browser — no uploads, no accounts, no stored values.

  • Encode Code 128 (auto code-set), Code 39, EAN-13, EAN-8 and UPC-A.
  • Validate values with real check digits and format rules.
  • Adjust bar width, height, bar and background colors.
  • Show or hide the human-readable text line.
  • Export crisp SVG or PNG files, fully offline.

Frequently asked questions

Why does EAN-13 need exactly twelve or thirteen digits?

An EAN-13 code is twelve data digits plus one check digit. If you enter twelve digits, the tool computes and appends the check digit; if you enter all thirteen, it verifies that the last digit matches.

What is the check digit for?

The check digit protects against misreads and typing errors. Every retail scanner verifies it before accepting a scan, so a wrong check digit makes the barcode unreadable rather than pointing at the wrong product.

Which Code 128 variant should I choose?

Code set B handles all printable ASCII characters. Code set C encodes two digits per symbol and is more compact for numeric-only values. Automatic mode selects C when the whole value is digits with an even length, and B otherwise.

Why does my barcode have a white margin on each side?

That margin is the quiet zone. Symbology standards require a clear area of at least ten module widths on both sides so that scanners can find the start and end of the code. Removing it can make the barcode unscannable.