Barcodes have quietly powered retail, warehouses, and libraries for decades. They are the simple striped labels a scanner reads at a checkout or on a shipping box. Generating one online is straightforward once you know which type you need and what data it accepts.
This guide explains the common barcode types, when to use each, and walks through creating one step by step.
💡 Quick overview
Pick your barcode type (Code 128 for general use, EAN/UPC for retail) → Enter valid data → Adjust size → Download as SVG for print → Test with your scanner. Done in under a minute.
Barcodes Still Run the Physical World
While QR codes get the headlines, traditional barcodes still handle most product scanning at registers and in inventory systems. They are compact, cheap to print, and read instantly by the laser and camera scanners that stores and warehouses already own. If you sell or track physical items, a barcode is often exactly what you need.
Barcode vs QR Code
| Feature | Traditional barcode (1D) | QR code (2D) |
|---|---|---|
| Data stored | Short number or code | URLs, text, contacts, more |
| Data direction | Horizontal only | Horizontal + vertical |
| Best for | Product IDs, inventory systems | Links, marketing, mobile scanning |
| Scanned by | Laser scanners, cameras | Phone cameras |
Use a barcode when you need a product or item identifier that plugs into existing retail and inventory systems. Use a QR code when you want to link someone to a page or share richer content.
Common Barcode Types
Picking the right type is the most important decision because each type accepts different data and serves a different purpose.
Code 128
Code 128 — The general-purpose choice
- • Encodes both letters and numbers
- • High density — packs a lot into a small space
- • Widely used in shipping, logistics, and internal inventory
- • A strong default if you are unsure which type to use
Code 39
Code 39 — Simple and widely supported
- • Handles uppercase letters and numbers
- • Common in industrial and government settings
- • Less dense than Code 128 (wider barcode for same data)
- • Supported by nearly all scanners on the market
EAN-13 and UPC
EAN-13 / UPC — Retail product barcodes
- • The barcode you see on packaged goods in stores
- • Fixed-length number tied to a specific product (usually assigned, not made up)
- • UPC (12 digits) is standard in the US; EAN-13 is used internationally
- • You need a valid number from a registration body if selling through retailers
How to Generate a Barcode Online
The mechanics are quick once you know your type and data.
Step 1: Choose the Right Type
Start by selecting the barcode format that matches your use case:
- Internal tracking or shipping? → Code 128
- Industrial or government labels? → Code 39
- Retail product for store shelves? → EAN-13 or UPC (with a valid assigned number)
Choosing the wrong type is the most common reason a barcode fails to scan in the target system.
Step 2: Enter Valid Data
Each format has rules about what characters and lengths it accepts. A numeric format will reject letters, and fixed-length formats need exactly the right number of digits. Most online generators validate your input and warn you when something does not fit — pay attention to those messages.
⚠️ Validation matters
A single extra digit or wrong character type produces a barcode that looks fine but will not scan in your system. Double-check format requirements before generating.
Step 3: Size, Download, and Test
Set a comfortable width and height. The bars need to be wide enough for your scanner to read. Then download:
- SVG for print — bars stay crisp at any size
- PNG for screens or quick tests
Before you print a full run of labels, scan one with the actual scanner or a phone app to confirm it reads correctly. Bars that are too thin or printed too small are a frequent cause of scan failures.
Where Barcodes Are Used
Mistakes to Avoid
Choosing a barcode type that your scanning system does not support
Entering data that breaks the format's character or length rules
Printing the barcode too small or letting bars blur together
Skipping the test scan before printing a large batch of labels
Making up retail product numbers instead of using officially assigned ones
Key Takeaways
- ✓ Code 128 is the safe default for general tracking and logistics
- ✓ EAN-13 / UPC is for retail — you need an assigned product number
- ✓ Each format has strict rules about characters and length
- ✓ Download SVG for print, PNG for screens
- ✓ Always test a sample scan before printing many labels
Frequently Asked Questions
Which barcode type should I use for inventory?
Code 128 is a common choice for internal inventory and asset tracking because it handles both letters and numbers in a compact format.
Can I make a retail product barcode myself?
You can generate the image, but the product number for EAN or UPC is usually assigned through an official body. Confirm how to get a valid number before selling through retailers.
What format should I download for printing?
SVG is the recommended format for print because it scales without losing sharpness. PNG works for screens and quick digital use.
Why does my barcode fail to scan?
Common causes are printing too small, low contrast between bars and background, or choosing a barcode type the scanner does not support. Test a sample before printing many.
Is generating a barcode online free?
Yes. Most online barcode generators let you create and download standard barcodes at no cost and with no registration required.
What is the difference between a barcode and a QR code?
A barcode is one-dimensional (lines) and holds a short identifier. A QR code is two-dimensional (squares) and holds richer data like URLs or contacts. They serve different purposes.