Barcode Generator

Generate barcodes online for free. Create Code 128, EAN-13, and UPC-A barcodes from any text or number, preview them live, then copy the SVG code or download a high-resolution SVG or PNG. Everything runs in your browser.

Preview

  

ToolsSoup's Barcode Generator turns any text or number into a scannable barcode right in your browser. Choose Code 128 for letters and numbers, or EAN-13 and UPC-A for retail product codes, then watch the barcode update live as you type. Tune the bar width and height, toggle the human-readable value underneath, and export your barcode as crisp vector SVG code or a high-resolution PNG image. There is no sign-up, no watermark, and no upload — every barcode is rendered locally on your device, so your data never leaves your computer.

What is a barcode generator?

A barcode generator is a tool that encodes a value — a product number, SKU, URL, serial, or any short string — into the pattern of black bars and white spaces that a scanner reads. This generator supports three of the most widely used 1D (linear) symbologies: Code 128, a high-density format that encodes the full ASCII set and is common in shipping and logistics; EAN-13, the 13-digit standard printed on retail products worldwide; and UPC-A, the 12-digit code used mainly in North America. The output is true vector SVG, so the barcode stays razor-sharp at any size you print or display it.

How to generate a barcode

Creating a barcode takes just a few seconds:

  1. Pick the barcode type: Code 128 for text and numbers, or EAN-13 / UPC-A for product codes.
  2. Type or paste the value you want to encode in the data field.
  3. For EAN-13 enter 12 digits and for UPC-A enter 11 — the check digit is calculated automatically — or paste the full code with the check digit included.
  4. Adjust the bar width and height and toggle the readable value to taste.
  5. Copy the SVG code, or download the barcode as an SVG or a high-resolution PNG.

EAN-13, UPC-A, and the check digit

EAN-13 and UPC-A both end in a check digit that scanners use to confirm the code was read correctly. You do not need to compute it yourself: enter the first 12 digits of an EAN-13 (or the first 11 of a UPC-A) and the generator appends the correct check digit before drawing the barcode. If you paste a complete code, it is validated against the standard formula so you know immediately whether the number is valid.

Why use this barcode generator?

  • Supports Code 128, EAN-13, and UPC-A — the most common linear barcode formats.
  • Live preview updates instantly as you type and change the bar size.
  • Automatic check-digit calculation and validation for EAN-13 and UPC-A.
  • Exports resolution-independent SVG code plus a high-resolution PNG download.
  • 100% free with no sign-up, watermark, or usage limits.
  • Runs entirely in your browser — your data is never uploaded or stored.

Frequently asked questions

Which barcode format should I use?

Use Code 128 when you need to encode letters, numbers, or symbols — it is the go-to choice for shipping labels, asset tags, and internal SKUs. Use EAN-13 for retail products sold internationally and UPC-A for products sold mainly in North America; both encode digits only and follow strict length rules.

Do I need to add the check digit myself?

No. For EAN-13 enter the first 12 digits and for UPC-A enter the first 11; the generator calculates and appends the correct check digit automatically. You can also paste a complete code, and the tool will verify the check digit for you.

Are the barcodes scannable?

Yes. The bar patterns follow the official Code 128, EAN-13, and UPC-A specifications, so they scan with standard barcode readers and phone apps. For best results, keep enough bar width and the white quiet zone on each side, and print at a size your scanner can resolve clearly.

What is the difference between the SVG and PNG downloads?

SVG is a vector file that stays perfectly sharp at any size, which makes it ideal for printing and for editing in design tools. PNG is a raster image that is easy to drop into documents, slides, and websites; this tool exports it at 2× resolution so it stays crisp on screen.

Is anything uploaded to a server?

No. The barcode is generated entirely in your browser using JavaScript. The value you encode and the resulting image never leave your device, so it is safe to use with private product codes and serial numbers.