ToolsHubs
ToolsHubs
Privacy First

Barcode Generator

Create standard 1D and 2D barcodes including Code 128, EAN-13, and PDF417. Download as high-res PNG.

How to use Barcode Generator

  1. 1

    Select a barcode type from the dropdown.

  2. 2

    Enter the text or numbers to encode.

  3. 3

    Adjust scaling and height using the sliders.

  4. 4

    Download the barcode image.

Frequently Asked Questions

What is the most common barcode type?

Code 128 is the standard for general text, while EAN-13 and UPC-A are used for retail products.

What Is a Barcode?

A barcode is a machine-readable representation of data. The pattern of parallel lines (or dots, in 2D codes) encodes information that a scanner can read optically in milliseconds — far faster and more reliably than any human typist.

You interact with barcodes dozens of times every day: the product you scanned at self-checkout, the boarding pass on your phone, the package the courier delivered. Behind all of these is a standardized encoding scheme that converts data into a visual pattern that scanners worldwide can reliably read.


1D vs 2D Barcodes: What's the Difference?

1D (linear) barcodes encode data in a single row of parallel bars and spaces. They can hold a limited amount of data — typically 20–80 characters — and can only be scanned horizontally.

2D barcodes (like QR codes and DataMatrix) arrange information in a grid pattern, encoding data both horizontally and vertically. This allows them to pack hundreds of characters into a small space.

Our tool focuses on 1D barcode formats, which remain the global standard for retail and logistics.


Barcode Formats Explained

Code 128 The most versatile linear barcode format. It can encode the full ASCII character set (all letters, numbers, and most symbols). Used heavily in shipping and logistics because you can include long strings of mixed characters.

Typical use: Shipping labels, warehouse management, courier tracking.

EAN-13 (European Article Number) A 12-digit number (the 13th digit is a check digit, calculated automatically). The international standard for retail product identification. If you're selling products in any physical store, your items likely need EAN-13 barcodes.

Typical use: All retail products globally. Required by most point-of-sale systems.

UPC-A (Universal Product Code) A 12-digit barcode format used predominantly in the United States and Canada. Functionally similar to EAN-13, just one digit shorter. Most scanners that read EAN-13 also read UPC-A.

Typical use: North American retail products.

Code 39 One of the oldest still-in-use barcode formats. Encodes uppercase letters, digits, and a few special characters. Less dense than Code 128 but very widely supported by older scanners.

Typical use: Healthcare (wristbands), automotive parts, military applications.

EAN-8 A compact 7-digit version of EAN-13 for small products where there isn't space for a full EAN-13 barcode.

Typical use: Small packaging — chewing gum packets, small cosmetics.

ITF-14 A high-density format for encoding 14-digit GTIN numbers on shipping cartons. Designed to be printed directly on corrugated cardboard, which has a rougher surface that many barcode types handle poorly.

Typical use: Outer carton labeling in retail supply chains.


Getting a Valid EAN/UPC Number

You can't just make up an EAN-13 number. The first digits identify the country and company (assigned by GS1, the global barcode authority), and the last digit is a mathematically derived check digit. Our tool calculates the check digit automatically.

For a personal project (internal use only, not retail): Use a number in the test range 0000000000000 through 0000000000999. These are not registered with GS1 and won't conflict with real products, but should only be used internally.

For retail products: You need to register with GS1 in your country. They will assign you a company prefix, and from there you generate unique product codes.


Customization Options

Size: Adjust width and height to fit your label dimensions. Keep the bars tall enough for scanners — 15–40mm height is typical for most applications.

Quiet zone: Barcodes require a blank white margin (the "quiet zone") on the left and right. Never place other graphics right up against a barcode — it will cause scan failures.

Text display: Choose whether to show the encoded number in human-readable text below the barcode.

Colors: Black bars on white are standard. While some scanner types can read colored barcodes, avoid colors with low contrast (light on light, or similar), and never use red bars — most laser scanners use red light and can't distinguish red bars from the background.

Format: Download as SVG (vector, scales without quality loss, ideal for print) or PNG (for digital use).