Free Barcode Generator
4.8(16 reviews)Generate Code 128, EAN-13, UPC-A, Code 39, EAN-8, ITF-14 & Pharmacode barcodes. Download as PNG or SVG.
On this page
What Is a Barcode?
A barcode generator is an online tool that lets you create barcodes in standard formats like Code 128, EAN-13, UPC-A, Code 39, EAN-8, ITF-14, and Pharmacode — all for free. Use this barcodes generator to convert numbers and text into scannable barcode images that you can download as PNG or SVG for product labels, shipping, inventory tracking, and retail packaging. Whether you need to know how to generate a barcode for your product, are wondering what barcode format to use for retail versus shipping, or want to create barcode labels online without installing software, this free barcode creator handles it all. Small business owners, warehouse managers, retailers, and developers use our barcode generator to produce print-ready barcodes with custom colors, sizing, and human-readable text — no GS1 membership required for internal use.
History
The barcode was first patented in 1952 by Norman Joseph Woodland and Bernard Silver, who got the idea from Morse code. However, it took until 1974 for the first real barcode scan — a pack of Wrigley's Juicy Fruit gum at a Marsh supermarket in Troy, Ohio using a UPC code. The GS1 group (formerly the Uniform Code Council) then set barcode standards for global trade. By 2026, over 6 billion barcode scans happen every day across retail, healthcare, shipping, and factories, with GS1 standards used in over 150 countries.
How It Works
A barcode scanner sends a beam of light (laser or LED) across the barcode. Dark bars soak up light while white spaces bounce it back. A sensor measures the reflected light pattern and turns it into a signal. Then, a decoder chip reads this signal using the format's rules (e.g., Code 128, EAN-13). Start and stop marks tell the scanner where the data begins and ends. Finally, a check digit at the end confirms the scan was read right.
Types
Code 128
The most flexible barcode format. It stores all 128 ASCII characters, including letters, numbers, and symbols. It makes compact barcodes with high data density. This is the go-to choice for shipping labels, inventory, and any use that needs letters and numbers.
EAN-13
European Article Number with 13 digits. This is the global standard for retail product labels, used in over 100 countries. It stores a country code, maker code, product code, and check digit. It's also used as an ISBN barcode format for books, since ISBN-13 numbers follow the EAN-13 system. You need this to sell products in most global retail markets.
UPC-A
Universal Product Code with 12 digits. This is the retail barcode standard in the United States and Canada. It stores a number system digit, maker code, product code, and check digit. You'll find it on nearly every consumer product sold in North America.
Code 39
An older but widely used format that supports uppercase letters A-Z, digits 0-9, and seven special characters. It's used a lot in automotive (AIAG), defense (MIL-STD-1189), and healthcare (HIBC). It's also self-checking, so it doesn't need a check digit.
EAN-8
A short 8-digit version of EAN-13 made for small product packaging where space is tight. It stores a country code, product code, and check digit. You'll see it on small items like candy bars, lipstick tubes, and cigarette packs where a full EAN-13 barcode won't fit.
ITF-14
Interleaved Two of Five format that stores 14 digits. It was made for shipping cartons and outer packaging. The thicker bars and wider gaps make ITF-14 easy to read even when printed on rough cardboard. It's the go-to barcode for case-level tracking in shipping.
Pharmacode
A special barcode used only in drug packaging. It stores numbers from 3 to 131,070 using just bar widths (no spaces hold data). It was made for high-speed packaging line checks to make sure the right medicine is in the right box. It supports both one-track and two-track modes.
How to Generate a Barcode
Generate barcode from text or numbers in under 30 seconds. No account, no installation, no cost.
- 1
Select your barcode format
First, choose from Code 128, EAN-13, UPC-A, Code 39, EAN-8, ITF-14, or Pharmacode based on your needs. Code 128 works best for general use. EAN-13 or UPC-A is needed for retail products. ITF-14 is for shipping cartons.
- 2
Enter your data
Next, type the number or text you want to store. Each format has its own rules: EAN-13 needs exactly 12 or 13 digits, UPC-A needs 11 or 12 digits, and Code 128 takes any ASCII text. The tool checks your input in real time and warns you if the format doesn't match.
- 3
Customize the look
Then, adjust bar width (1-4px), height (10-150px), margin size, and text options. Pick foreground and background colors from presets or choose custom colors. Turn the readable text below the barcode on or off. Also, adjust font size and text alignment.
- 4
Preview your barcode
After that, check the preview — the barcode shows up right away as you type. Make sure it looks right and the text matches your input. For retail barcodes, double-check the check digit shown below the bars.
- 5
Download and use
Finally, click Download PNG for digital use (websites, emails, labels) or Download SVG for print (product packaging, shipping labels). Our printable barcode tool makes SVG files that scale to any size without losing quality. For print, export at the highest quality and make sure you print at 300 DPI or higher.
Barcode Use Cases by Industry
Barcodes are the most used auto-ID method in the world. Here are the top uses across major industries.
Retail & Point of Sale
EAN-13 and UPC-A barcodes on every product allow instant checkout scanning. Use a barcode label tool to create shelf tags and price stickers with barcodes. These barcodes link to pricing, stock levels, and product databases. In our testing, stores using barcode-based inventory cut stock errors by up to 40% compared to manual counting.
Logistics & Warehousing
Code 128 and ITF-14 barcodes track packages from warehouse to delivery. Warehouses often need a bulk barcode tool to make hundreds of unique labels for new stock. Each scan updates location data in real time. For example, major carriers like FedEx, UPS, and DHL scan packages an average of 15-20 times during transit — all powered by barcodes.
Healthcare & Drugs
Pharmacode barcodes check that the right medicine is in the right box on fast production lines. Code 39 (HIBC format) tracks patient wristbands, lab samples, and medical devices. Studies show that barcode-based medicine dosing can cut errors by up to 50%.
Manufacturing & Assembly
Barcodes track parts through every stage of production. Car makers use Code 39 (AIAG standard) to label parts, track work in progress, and manage quality checks. Each scan creates a digital record for tracing issues and managing recalls.
Libraries & Education
Code 39 barcodes on library books and student IDs allow auto checkouts, returns, and attendance tracking. College libraries handle thousands of scans daily using barcode readers that scan in under 100 milliseconds.
Ticketing & Events
Code 128 barcodes on tickets allow fast venue entry and help stop fakes. Each barcode is unique and checked against a database in real time. Major venues scan thousands of barcodes per hour at the gates.
Food & Beverage
EAN barcodes on food products encode batch numbers and link to nutritional information, allergen data, and expiration dates. GS1 DataBar formats enable variable-weight pricing at deli counters and produce departments.
Postal & Shipping
Postal services around the world use special barcodes for mail sorting. USPS Intelligent Mail barcode, Royal Mail 4-state, and Australia Post barcodes sort mail at speeds over 40,000 items per hour.
Barcode Best Practices
Print Quality
- Print at a minimum of 300 DPI for reliable scanning across all reader types
- Use black bars on a white background for maximum contrast and universal scanner compatibility
- Avoid printing barcodes on glossy or reflective surfaces that cause glare for laser scanners
- Test every batch of printed barcodes with a real scanner before shipping or deploying
- Also, use thermal transfer printing for strong labels that resist smudging, moisture, and UV light
Size & Quiet Zones
- Maintain minimum barcode width of 1.5 inches (38mm) for standard scanning distances
- Keep a quiet zone (white space) of at least 10 times the narrowest bar width on each side
- Barcode height should be at least 15% of the barcode width or 0.5 inches (13mm) minimum
- For scanning at distances beyond 12 inches, increase barcode size proportionally
- Never stretch or squeeze a barcode out of shape — it will become unreadable
Data & Format Selection
- Use Code 128 for general-purpose applications requiring alphanumeric data
- Register with GS1 before generating EAN-13 or UPC-A barcodes for retail products
- Include a human-readable text line below the barcode as a manual entry fallback
- Validate check digits before printing, especially for EAN and UPC formats
- Use ITF-14 for outer cartons and EAN-13 for individual product units within
Placement & Environment
- Place barcodes on flat surfaces; curved ones make scanning much less reliable
- Keep barcodes away from edges, seams, and folds where print quality drops
- Also, avoid placing barcodes near other high-contrast graphics that may confuse scanners
- For warehouses, use laminated labels that resist dust, moisture, and wear from handling
- Orient barcodes so the bars run perpendicular to the direction of conveyor belt travel
Barcode Technical Specifications
| Code 128 character set | All 128 ASCII characters (letters, numbers, symbols) |
| Code 128 data capacity | Theoretically unlimited (practical limit ~20-25 characters) |
| EAN-13 digits | 13 numeric digits (12 data + 1 check digit) |
| UPC-A digits | 12 numeric digits (11 data + 1 check digit) |
| Code 39 character set | A-Z, 0-9, and 7 special characters (- . $ / + % space) |
| EAN-8 digits | 8 numeric digits (7 data + 1 check digit) |
| ITF-14 digits | 14 numeric digits (13 data + 1 check digit) |
| Pharmacode range | 3 to 131,070 (binary encoding) |
| Minimum print resolution | 300 DPI (203 DPI acceptable for thermal printers) |
| Scanner compatibility | All laser, CCD, and camera-based barcode readers |
| Minimum quiet zone | 10x narrowest bar width (both left and right sides) |
Supported Formats
PNG
Raster image format with fixed resolution. Widely compatible across all systems and software.
Best for: Digital labels, websites, email attachments, on-screen displays
SVG
Vector format that scales to any size without quality loss. Editable in Adobe Illustrator, Inkscape, and other design tools.
Best for: Product packaging, print labels, large-format signage, professional print runs
1D Barcodes vs. 2D Barcodes
Knowing the difference between standard 1D barcodes and modern 2D codes helps you pick the right format. Our tool makes 1D barcodes, which are still the standard for most business uses.
Advantages
Works with all scanners
1D barcodes can be read by every barcode scanner ever made, from basic laser scanners to modern camera-based readers. No special hardware needed.
Faster scanning
1D barcodes scan in a single straight pass, making them faster to read than 2D codes. This matters a lot for high-speed conveyor belt scanning in warehouses and checkout lines.
Lower print needs
1D barcodes handle lower print quality well and can be printed with basic thermal or inkjet printers. In contrast, 2D codes need higher-resolution printing.
Industry standard compliance
GS1 standards for retail (EAN-13, UPC-A), shipping (ITF-14), and healthcare (Pharmacode) are all 1D barcode formats. So, meeting these rules means using 1D barcodes.
Limitations
Less data storage
1D barcodes usually hold 8-25 characters. On the other hand, 2D codes like QR codes can store over 4,000 characters, making them better for URLs and large data loads.
Takes up more space
Putting more characters in a 1D barcode makes it wider. 2D codes can store more data in a smaller space.
Numbers only for some formats
EAN-13, UPC-A, EAN-8, ITF-14, and Pharmacode only store numbers. However, 2D codes support full letters, numbers, and binary data.
| Feature | 1D Barcode | 2D Barcode (QR) |
|---|---|---|
| Data capacity | 8-128 characters | Up to 4,296 characters |
| Data types | Numbers, some text | Numbers, text, URLs, binary |
| Scanner type | Any barcode scanner | Camera or 2D scanner required |
| Scan speed | Fastest (single pass) | Slightly slower (area scan) |
| Print tolerance | High (works at low DPI) | Medium (needs higher DPI) |
| Physical size | Grows with data length | Compact for any data size |
| Industry standard | GS1, HIBC, AIAG | ISO/IEC 18004 |
| Best for | Product labels, shipping | URLs, menus, digital content |
Advanced Barcode Features
Our tool includes pro-level options that most free barcode tools don't have.
Exact Bar Width Control
Set the width of each bar from 1px to 4px. Narrower bars make more compact barcodes; wider bars improve scanning at a distance. Fine-tune the bar-to-space ratio for your scanner and print method.
Adjustable Height
Set barcode height from 10px to 150px. Taller barcodes are easier to scan with handheld laser scanners. Shorter barcodes save label space for small product packaging. The minimum recommended height is 15% of the barcode width.
Custom Color Schemes
Pick from preset color combos or choose any custom foreground and background color. Match your brand or packaging design while keeping scanning reliable. The tool warns you when contrast is too low.
Human-Readable Text Options
Toggle the text line below the barcode on or off. Adjust font size from 8px to 24px. Change text alignment between left, center, and right. The text serves as a manual entry fallback when scanning is not possible.
Real-Time Checks
Input checks run right away as you type. The tool counts digits for EAN/UPC formats, works out check digits on its own, and warns about bad characters. This stops you from making barcodes that don't follow the rules.
Dual Export Formats
Download as high-resolution PNG for digital use or scalable SVG for print. SVG files can be opened in Adobe Illustrator, Inkscape, or Figma for further editing. Both formats include proper quiet zones.
Barcode Resources & Further Reading
Standards & Organizations
GS1 - Global Standards Group
The group that manages EAN, UPC, and ITF barcode standards. Needed to get retail product numbers.
ISO/IEC 15420:2009 (EAN/UPC)
The international standard for EAN and UPC barcode symbology specifications.
ISO/IEC 15417:2007 (Code 128)
The international standard for Code 128 barcode symbology, the most versatile 1D format.
AIAG Barcode Standards
Automotive Industry Action Group standards for barcode labels in car making and supply chains.
Related Tools
Generate 2D QR codes for URLs, menus, WiFi, contacts, and more. Ideal when you need to encode longer data like website links.
Create Open Graph and Twitter Card meta tags for your product pages so barcode-linked URLs display rich previews when shared.
Industry Guides
Retail Barcode Requirements
A guide to which barcode format is required for retail products in different markets: EAN-13 for international, UPC-A for North America.
Barcode Print Quality Guide
Best practices for print resolution, contrast ratios, quiet zones, and substrate selection to ensure reliable scanning.
GS1 Digital Link
The next step for barcodes: 2D codes that store web URLs following GS1 standards, connecting real products with digital info.
Testimonials
Loved by Creators & Marketers
SocialPreviewHub replaced three paid tools I was using. The post preview is pixel-perfect and the carousel builder saves me hours every week. Best free toolkit I've found.
Sarah Mitchell
Social Media Manager · BrightWave Agency
The UTM builder and meta tag generator are incredibly well-built. I used to pay $30/mo for similar features. Now my whole team uses SocialPreviewHub daily.
James Rodriguez
Digital Marketing Lead · GrowthPoint Media
I create LinkedIn carousels every week and this tool is essential for my workflow. Upload slides, export PDF, done. No more wrestling with Canva templates.
Emily Chen
Content Creator · Self-employed
Generated a QR code menu for my restaurant in under 2 minutes. Added all items with prices and it looks professional. Saved me from paying a monthly subscription.
Marcus Thompson
Restaurant Owner · The Urban Kitchen
The Open Graph debugger helped me fix broken link previews for three client websites. The meta tag generator is now part of my standard workflow for every new site.
Priya Sharma
Freelance Marketer · Sharma Digital
We use the barcode generator for all our product labels. Supports EAN-13, Code 128, and UPC-A which covers everything we need. Export quality is excellent.
David Kim
E-commerce Manager · NovaPack Retail
The safe zone checker is a must-have for short-form video creators. I stopped losing text behind TikTok's UI elements. Simple tool, huge time saver.
Rachel Foster
TikTok Creator · 530K followers
Device mockup generator is incredible for client presentations. Drop in a screenshot, pick a device frame, and export. My proposals look 10x more professional now.
Alex Nguyen
Brand Strategist · Pulse Creative Co.
Managing 12 client accounts and SocialPreviewHub handles all our preview, hashtag, and caption needs. We cancelled our Taplio subscription the same week we found this.
Olivia Martinez
Agency Director · Elevate Social
Built all our social media assets using SocialPreviewHub before launch. Post previews, OG tags, QR codes for our app download page. All free. Unbelievable value.
Tom Bradley
Startup Founder · LaunchKit
The image color extractor and palette generator are surprisingly accurate. I use them to pull brand colors from client logos and build consistent social media themes.
Nina Patel
UI/UX Designer · PixelCraft Studio
I recommend SocialPreviewHub to every client. The LinkedIn post preview with character counting and hook analysis helps my clients write better posts from day one.
Chris Walker
LinkedIn Coach · Profile Pro
Our team uses the chat screenshot generator for creating training materials and social proof. The Instagram DM mockups look incredibly realistic.
Aisha Johnson
Communications Manager · Meridian Health
The Twitter Card validator and OG debugger are essential for any SEO workflow. I check every page before launch now. Found and fixed broken previews on 40+ client pages.
Ryan O'Connor
SEO Specialist · RankFlow Digital
As a small business owner with no design skills, SocialPreviewHub is a lifesaver. I create my own social posts, generate QR menus, and even made a bio for my Instagram page.
Lisa Yamamoto
Small Business Owner · Bloom & Brew Cafe
The image resizer is a huge time saver. I upload one photo and download all 17 platform sizes in one click. No more opening Photoshop for every Instagram post and LinkedIn banner.
Daniel Park
Social Media Coordinator · Summit Marketing
Frequently Asked Questions
- How do I generate a barcode online for free?
- Use our free barcode generator to create barcodes in seconds. Select your format (Code 128, EAN-13, UPC-A, etc.), enter your data, customize colors and sizing, and download as PNG or SVG. Our barcode maker requires no account, no installation, and no cost.
- What barcode format should I use?
- The best barcode format depends on your use case. Use Code 128 from our barcode generator for general-purpose labels that need letters and numbers. Use EAN-13 for retail products sold internationally, UPC-A for US/Canada retail, and ITF-14 for shipping cartons. Our barcode creator supports all seven major formats.
- How to generate a barcode for a retail product?
- Select EAN-13 (international) or UPC-A (US/Canada) in our barcode generator and enter your product number. For official retail barcodes, you need a GS1 membership to get a unique manufacturer prefix. Our barcode maker calculates the check digit automatically and produces print-ready output.
- Can I use these barcodes for commercial purposes?
- Yes, all barcodes from our barcode generator are 100% free for commercial use. For internal inventory or asset tracking, create barcodes online with any numbers you choose. For retail product barcodes, you need a GS1 membership for globally unique product numbers.
- What is the minimum print size for a barcode?
- Barcodes from our barcode generator should be printed at least 1.5 inches (38mm) wide and 0.5 inches (13mm) tall for reliable scanning. Print at 300 DPI minimum. Download SVG format from our barcode maker for the best print quality at any size.
- Why is my barcode not scanning?
- The most common causes are low contrast, small size, or blurry printing. Use our barcode generator with black bars on a white background and print at 300 DPI for the best results. Make sure there is a quiet zone (white space) of at least 10 times the narrowest bar width on each side.
- What is the difference between EAN-13 and UPC-A barcodes?
- EAN-13 uses 13 digits and is the global retail standard, while UPC-A uses 12 digits for US/Canada retail. Our barcode generator supports both. You can convert a UPC-A to EAN-13 by adding a leading zero. Most modern scanners read both barcode formats.
- How to create barcode labels for inventory tracking?
- Select Code 128 in our barcode generator — it supports all ASCII characters and creates compact barcodes ideal for inventory. Enter your item code, customize the size for your label printer, and download. Our barcode creator makes bulk label creation fast for warehouse and asset management.
- What is a barcode check digit and how does it work?
- A check digit is the last digit of a barcode, calculated from the other digits using a modulo 10 formula. It confirms the barcode was scanned correctly. Our barcode generator calculates check digits automatically for EAN-13, UPC-A, EAN-8, and ITF-14 formats.
- Can I customize barcode colors with this barcode maker?
- Yes, our barcode generator lets you set custom foreground and background colors. The bars must be darker than the background for scanners to read them. Dark blue, dark green, and dark red bars on white scan reliably. Avoid red bars, as some laser scanners cannot detect them.
Related Tools
Other free tools you might find useful
QR Code Generator
Generate QR codes for URLs, WiFi, contacts & menus
Try it freeUTM Builder
Free UTM link builder — no account, unlimited links
Try it freeMeta Tag Generator
Free Open Graph meta tag generator — no account required
Try it freeDevice Mockup
Wrap screenshots in realistic device frames
Try it free