Preset

Format

Value _Enter data_

Width (bar) _2_

Height (px) _100_

Margin (px) _10_

Options

Show value

Text align

Font family _e.g. monospace, Arial_

Font size _16_

Text margin _4_

Line color _#111111_

Background _#ffffff_

### Results

Enter a value accepted by the selected barcode format before downloading.

Download SVG  Download PNG

# Barcode Generator - Create CODE128, EAN and UPC Barcodes

Generate one-dimensional barcodes in 10 formats. Customize dimensions, colors, and text. Download as SVG or PNG - free, browser-based, no sign-up required.

## What Is a Barcode Generator?

A **barcode generator** is a tool that encodes alphanumeric data into a visual pattern of parallel bars and spaces that can be read by a barcode scanner or smartphone camera. Barcodes are used across every industry - retail point-of-sale systems, warehouse inventory management, logistics and shipping labels, library book tracking, healthcare patient identification, and manufacturing quality control.

Our **free online barcode generator** supports 10 industry-standard barcode formats, lets you customize every visual element (bar width, height, color, font, margin), and exports high-quality SVG or PNG files ready for print and digital use - all in your browser with no data sent to any server.

For an internal inventory label, choose CODE128 and enter a value such as `SKU-1042`; test the downloaded image with your scanner. Creating a barcode image does not assign a retail product identifier. For a two-dimensional code containing a URL, use the [QR Code Generator](https://www.toolcomb.com/qr-code-generator).

### Supported Barcode Formats - Complete Reference

#### CODE128

The most versatile and widely-used 1D barcode format. Supports the full ASCII character set - letters, numbers, and special characters. High data density and self-checking. Used in shipping labels (FedEx, UPS), warehouse management, and general industrial applications. The recommended default for any custom barcode.

**Industries:** Logistics, shipping, warehousing, general business

#### CODE39

An older alphanumeric barcode supporting uppercase A–Z, digits 0–9, and a limited set of special characters (space, $, %, +, -, ., /). Lower data density than CODE128 but widely supported by legacy scanners. Used in automotive, defense, and healthcare industries.

**Industries:** Automotive, defense, healthcare, legacy systems

#### EAN-13

A 13-digit retail barcode carrying a product identifier and check digit. Prefixes do not necessarily identify the product's country of origin. Check the identifier and label requirements with your retailer or GS1.

**Industries:** Retail product identification

#### EAN-8

A compact 8-digit version of EAN-13 for small products where a full-size barcode wouldn't fit - candy bars, small cosmetics, matchbooks. Must be assigned by GS1.

**Industries:** Small retail products with limited label space

#### UPC-A

Universal Product Code - 12-digit barcode used as the retail product standard in the United States and Canada. Includes manufacturer and product identifiers. Familiar as the barcode on virtually every product sold in North American stores.

**Industries:** North American retail, grocery, consumer goods

#### UPC-E

A compressed 6-digit version of UPC-A for small packages. Suppresses leading zeros to fit in a smaller space. Must be derived from a valid UPC-A code.

**Industries:** Small US/Canadian retail products

#### ITF / ITF-14

Interleaved 2 of 5 - encodes pairs of digits in alternating bars and spaces for high efficiency. ITF-14 is the 14-digit version used on shipping cartons, pallets, and outer packaging in global supply chains. Highly resistant to printing imperfections.

**Industries:** Outer shipping cartons, pallets, supply chain

#### MSI

MSI Plessey - a numeric-only barcode typically used in retail shelf labels, bin locations, and inventory management systems. Supports multiple check digit algorithms (Mod 10, Mod 11, Mod 1010).

**Industries:** Retail shelf labels, inventory bin locations

#### Codabar

One of the oldest barcode formats, used in blood banks, libraries (Monarch barcodes), photo lab envelopes, and FedEx airbills. Supports digits 0–9 and special characters –$:/.+.

**Industries:** Blood banks, libraries, overnight delivery, photo labs

### How to Create a Barcode - Step by Step

1. **Select a preset** - Choose Default, Compact, Tall, or Retail as a starting point for width, height, and margin. Verify the printed result against your scanner and recipient requirements.
2. **Choose the barcode format** - Select from CODE128, CODE39, EAN-13, EAN-8, UPC-A, UPC-E, ITF, ITF-14, MSI, or Codabar based on your industry standard and scanning environment.
3. **Enter your data** - Type or paste the value to encode. EAN-13 accepts 12 digits or 13 with a valid check digit; UPC-A accepts 11 digits or 12 with a valid check digit. Other formats have their own requirements.
4. **Adjust dimensions** - Set bar width (1–6), height in pixels (40–400), and quiet zone margin (0–40px). Wider bars and taller barcodes scan more reliably at greater distances.
5. **Customize text display** - Toggle value display, set font family, font size, text margin, and text alignment (left, center, right).
6. **Set colors** - Choose custom line color and background color. Always maintain high contrast - dark lines on light background for maximum scannability.
7. **Download** - Click Download SVG for infinitely scalable vector output (best for print), or Download PNG for raster output (for web and digital use).

### Barcode Design Best Practices

✓

**Maintain high contrast:** Dark bars on a light background is the most reliable combination. Avoid low-contrast colors like light gray on white or yellow on white. Most scanners expect a minimum contrast ratio of 3:1.

✓

**Check print requirements:** Minimum dimensions and quiet zones depend on the barcode format, print process and scanning environment. Follow the relevant standard and your retailer's requirements.

✓

**Preserve the quiet zone:** Leave the required clear space around the bars. A margin measured in pixels does not by itself guarantee the right physical print size.

✓

**Always test before printing at scale:** Scan your generated barcode with at least two different scanners (a handheld scanner and a smartphone) before printing in bulk. Print a test label at full size and scan it from the expected scanning distance.

✓

**Use SVG for print:** SVG is a vector format - it scales to any size without pixelation. Download SVG for business cards, product labels, and any print job. Use PNG for digital use, websites, and when the recipient's system can't handle SVG.

✓

**Choose the right format:** Check the format and identifier with the retailer or recipient. EAN and UPC are common for retail; CODE128 is often used for internal or logistics labels.

### Frequently Asked Questions - Barcode Generator

#### What is the most widely used barcode format?

There is no single best format for every use. EAN and UPC are common for retail products, while CODE128 is common for internal and logistics labels. Confirm what your scanner or trading partner accepts.

#### How do I get a barcode for my product to sell in stores?

Ask the retailer or marketplace which product identifier and barcode it requires. GS1 can issue identifiers where needed. This tool creates an image from the number you enter; it does not assign or register that number.

#### What is the difference between SVG and PNG output?

SVG is a vector format - it scales to any size without losing quality. It's best for print production, large-format labels, and any use where the barcode will be resized. PNG is a raster format at a fixed resolution - it's best for digital use, web pages, email, and software screenshots.

#### Can I use colored barcodes?

Yes, but with caution. Barcodes must have sufficient contrast between the bars and background to scan reliably. Black on white is the safest choice. Avoid using red or orange for bars - many laser scanners use a red laser that cannot read red-colored bars. If using color, always scan-test thoroughly before printing.

#### Are barcodes generated locally or sent to a server?

All barcode generation happens entirely in your browser. Your data values are never transmitted to any server, making the tool safe for sensitive product data, internal SKUs, and confidential inventory information.

#### What data can I encode in a CODE128 barcode?

CODE128 can encode any of the 128 ASCII characters - all 26 uppercase and lowercase letters, digits 0–9, and special characters including spaces, punctuation, and control characters. Maximum data length depends on bar width and scanning conditions, but practical maximums are typically 48–80 characters for reliable scanning.

## Related Tools

Discover more free tools that might help with your next task.

[Resume Builder Create professional resumes with customizable templates Use Tool](https://www.toolcomb.com/resume-builder)

[Invoice Generator Create professional invoices with templates Use Tool](https://www.toolcomb.com/invoice-generator)

[Profile Card Create professional buisness profile cards Use Tool](https://www.toolcomb.com/profile-card)

[QR Code Generator Create QR codes for business and marketing Use Tool](https://www.toolcomb.com/qr-code-generator)

### Related guides

Read the how-to, then come back to this tool when you are ready to run it locally.

- [Why Your Barcode Won’t Scan (Quiet Zone, Format, and Check Digits) Code128 vs EAN-13 vs UPC, printers that bleed, guns that expect another symbology. Generate a 1D barcode in the browser - drawing bars is not a GS1 license.](https://www.toolcomb.com/blog/why-barcode-wont-scan)
- [Why Your QR Code Won’t Scan (Print, Contrast, and Payload Size) Finder patterns, error correction, logos, and glossy lamination. Generate a scannable code in the browser - a QR is not encryption.](https://www.toolcomb.com/blog/why-qr-code-wont-scan)
- [How QR Codes Work (and How to Generate One) QR basics and local generation for URLs, Wi-Fi, and vCards.](https://www.toolcomb.com/blog/how-qr-codes-work-and-how-to-generate-one)

[View All Tools](https://www.toolcomb.com/tools)
