# Barcode Generator

> Create EAN-13, UPC-A, EAN-8, Code 128 and Code 39 barcodes as SVG or PNG, with check digits computed for you and size, color and quiet zone options.

- URL: https://www.tooljig.com/barcode-generator
- Category: [Generators](https://www.tooljig.com/category/generators.md)
- Runs: In the browser; nothing uploaded
- Price: free, no account needed

## What it does

Type a product number or any text and get a scannable barcode in the symbology you need. EAN-13, UPC-A and EAN-8 check digits are computed, or validated if you type the full number, and shown with the standard digit layout and longer guard bars. Code 128 picks code sets B and C automatically for the shortest barcode and adds its checksum; Code 39 can add an optional mod 43 check character. Set the bar width, height, colours and quiet zone, then download a crisp SVG or a PNG at 1×, 2× or 4×.

## How to use it

1. Choose the symbology and type the data.
2. Adjust the module width, height, quiet zone and colours.
3. Download the barcode as SVG or PNG.

## Good to know

- This tool draws barcodes; it does not register numbers. Retail EAN and UPC numbers must come from GS1 to be valid in shops.
- Code 128 here covers printable ASCII (space to ~) using code sets B and C; control characters, code set A and GS1-128 application identifiers are not supported. Code 39 supports its standard 43 characters, not Full ASCII mode.
- Keep strong contrast (dark bars on a light background) and the quiet zone: most scanners fail on light bars, low contrast or margins under about 10 modules.

## FAQ

### How is the EAN-13 check digit calculated?

Multiply the 12 digits alternately by 1 and 3 from the left (the rightmost data digit always gets 3), add them up, and take the amount needed to reach the next multiple of 10. For 590123412345 that is 7.

### What is the difference between UPC-A and EAN-13?

UPC-A has 12 digits and is used mainly in North America. It is the same barcode as an EAN-13 whose first digit is 0, so scanners worldwide read both.

### Which barcode should I use for my own labels?

Code 128 for general text or numbers, since it is compact and supports letters, digits and symbols. Use EAN or UPC only with numbers assigned by GS1 for retail products.

## Related tools

- [QR Code Generator](https://www.tooljig.com/qr-code-generator.md): Create QR codes for links, text, Wi-Fi, email and phone numbers. Pick colors, size and error correction, then download a PNG or SVG. Made in your browser.
- [Random Number Generator](https://www.tooljig.com/random-number-generator.md): Generate random integers in any range, with or without repeats. Uses cryptographically secure randomness with no modulo bias.
- [UUID Generator](https://www.tooljig.com/uuid-generator.md): Generate random UUID v4 or time-ordered UUID v7 values, one or in bulk, with your browser's secure random number generator.
