# Barcode Generator

> A barcode generator renders a value into a scannable one-dimensional symbology such as Code 128, EAN-13 or UPC-A. Code 128 encodes the full ASCII set and is the right choice for anything internal; retail codes need a GS1-issued prefix to be valid in shops.

Source: https://rankcert.com/tools/barcode-generator
Free, no signup. Updated: 2026-08-29

## How to use it

1. Type the value you want encoded.
2. Pick the symbology your scanner or retailer expects.
3. Download the PNG and print it at a size the scanner can read.

## Barcode symbologies compared

Retail codes need a number issued under a GS1 company prefix. Anything internal can use Code 128 with no registration.

| Format | Encodes | Length | Use it for |
| --- | --- | --- | --- |
| Code 128 | Full ASCII | Variable | Anything internal - assets, locations, references |
| Code 39 | A-Z, 0-9, few symbols | Variable | Legacy industrial scanners |
| EAN-13 | Digits | 13 (12 + check) | Retail products outside North America |
| EAN-8 | Digits | 8 | Small retail packaging |
| UPC-A | Digits | 12 | Retail products in North America |
| UPC-E | Digits | 8 | Compressed UPC for small packs |
| ITF-14 | Digits | 14 | Shipping cartons and outer cases |
| Codabar | Digits, ABCD | Variable | Libraries, blood banks, couriers |

## Questions

### Which barcode format should I use?

Code 128 for anything internal - it encodes the full ASCII set and is the most widely scanned. EAN-13 and UPC-A are only for retail products with a registered GS1 number.

### Can I make my own EAN-13 number?

You can generate the image, but a valid retail barcode requires a company prefix from GS1. Inventing digits produces a scannable code that collides with someone else's product.

### How small can I print a barcode?

Keep the narrowest bar at or above 0.33mm and leave a quiet zone of at least ten times that on each side. Squeezing the quiet zone is the most common reason a printed barcode will not scan.

### Why is my value rejected?

Each symbology has strict rules - EAN-13 needs exactly 12 or 13 digits, Code 39 accepts only uppercase and a few symbols, Pharmacode only numbers from 3 to 131070.

### What is the difference between a barcode and a QR code?

A barcode is one-dimensional and holds around 20 characters. A QR code is two-dimensional and holds thousands, including URLs. Use a barcode for inventory numbers, a QR code for links.

### Do I need to buy a barcode for my product?

For retail, yes - a GS1 company prefix. Retailers reject numbers that do not resolve to a registered owner. For internal warehouse or asset tracking, generate whatever you like.

### What is the check digit?

The final digit of EAN and UPC codes, computed from the others. It lets a scanner detect a misread. Enter 12 digits for EAN-13 and the check digit is calculated for you.

### What resolution should I export for print?

At least 300 DPI, and never scale the image after export - resampling blurs the bar edges and scanners start failing.

## Related tools

- [Code 128 Barcode Generator](https://rankcert.com/tools/code-128-barcode-generator): Generate a Code 128 barcode from any text or number and download it as a PNG. Full ASCII, automatic subset switching, no signup and nothing uploaded.
- [EAN-13 Barcode Generator](https://rankcert.com/tools/ean-13-barcode-generator): Generate a valid EAN-13 retail barcode, with the check digit calculated for you, and download it as a print-ready PNG. Free, no signup, nothing uploaded.
- [UPC Barcode Generator](https://rankcert.com/tools/upc-barcode-generator): Generate a 12-digit UPC-A retail barcode with the check digit calculated automatically, and download it as a print-ready PNG. Free and entirely in your browser.
- [Code 39 Barcode Generator](https://rankcert.com/tools/code-39-barcode-generator): Generate a Code 39 barcode from uppercase letters, digits and a handful of symbols, and download it as a PNG. Free, no signup, runs in your browser.
- [ITF-14 Barcode Generator](https://rankcert.com/tools/itf-14-barcode-generator): Generate an ITF-14 carton barcode from a 13 or 14 digit GTIN and download it as a PNG. Free, no signup, and the check digit is handled for you.
- [Morse Code Translator](https://rankcert.com/tools/morse-code-translator): Translate text to Morse code and Morse back to text, covering letters, digits and punctuation. Runs in your browser with no signup.