Barcode Generator
A premium barcode generator that creates professional, print-ready barcodes entirely in your browser. Supports all major barcode standards including CODE128, CODE39, EAN-13, EAN-8, UPC-A, UPC-E, ITF-14, MSI, Pharmacode, and Codabar. Each format includes detailed validation with helpful error messages. Customize every aspect — width, height, margin, font size, font family, text position, and colors. Preview changes in real time, then download as PNG, SVG, or JPEG with optional high-resolution output. All processing happens locally using JsBarcode — nothing is uploaded to any server.
How Barcodes Work
Barcodes are machine-readable representations of data that use parallel lines (bars) and spaces of varying widths to encode information. A barcode scanner shines a laser or LED light across the barcode and measures the reflected light — dark bars absorb light while white spaces reflect it. The pattern of reflections is decoded into the corresponding data based on the specific barcode symbology.
Optical Scanning
Barcode scanners use laser or camera-based readers to capture the pattern of bars and spaces. The width ratios between bars and spaces encode the data.
Check Digit Validation
Most retail barcodes (EAN-13, UPC-A, ITF-14) include a check digit — the last digit is calculated from the preceding digits using a mathematical formula. This ensures the barcode was scanned correctly.
Symbology Standards
Each barcode type follows a specific symbology — the encoding rules that define how data is represented. For example, CODE128 encodes each character with 11 modules of bars and spaces.
Privacy First
All barcode generation happens entirely in your browser using JsBarcode. Your data never leaves your device — no servers, no tracking, no uploads.
Instant Generation
Barcodes are generated in real time with zero server round trips. As you type and adjust settings, the barcode updates immediately with smooth transitions.
Print-Ready Output
Download high-resolution PNG, vector SVG, or JPEG output. SVG is perfect for professional printing and design work — scales to any size without quality loss.
Barcode Types Explained
Understanding the different barcode standards and when to use each one.
Retail Barcodes (EAN/UPC)
EAN-13, EAN-8, UPC-A, and UPC-E are the standard barcodes found on retail products worldwide. They encode a product's GTIN (Global Trade Item Number) and are scanned at checkout.
Logistics Barcodes (CODE128, ITF-14)
CODE128 and ITF-14 are used in shipping and warehousing. CODE128 is versatile and high-density, while ITF-14 is specifically for outer carton packaging with built-in bearer bars.
Specialty Barcodes (Pharmacode, Codabar)
Pharmacode is used for pharmaceutical tracking, Codabar for libraries and blood banks, and MSI for warehouse inventory. Each was designed for specific industry needs.
All 10 Standards
ForgePlug supports all major barcode standards: CODE128, CODE39, EAN-13, EAN-8, UPC-A, UPC-E, ITF-14, MSI, Pharmacode, and Codabar — covering everything from retail products to pharmaceutical tracking.
Barcode Best Practices
Follow these guidelines to ensure your barcodes scan reliably and work in production.
Select the barcode standard that matches your industry and use case. Use EAN/UPC for retail products sold in stores, CODE128 for shipping and logistics, ITF-14 for outer cartons, Pharmacode for pharmaceutical packaging, and Codabar for library or blood bank applications.
Always maintain high contrast between bars and background. Black bars on a white background are the most reliable combination. Avoid low-contrast color combinations that may cause scanning failures. Test your barcodes with multiple scanners before printing in production.
Always include sufficient quiet zone (blank margin) around your barcode — typically at least 10× the bar width on each side. This helps scanners distinguish the barcode from surrounding content. Our generator includes configurable margin settings to ensure compliance.
For retail barcodes (EAN-13, EAN-8, UPC-A, UPC-B, ITF-14), ensure the check digit is correct. The check digit is calculated from the preceding digits and is used by scanners to verify accurate reading. Invalid check digits will cause scanning failures at the point of sale.
Common Barcode Mistakes
Avoid these common pitfalls when generating and using barcodes.
- Using the wrong barcode type for your industry (e.g., using CODE39 when EAN-13 is required for retail)
- Making barcodes too small — minimum recommended width is 1.5 inches for most applications
- Insufficient quiet zone (margin) around the barcode — this causes scanning failures
- Low contrast between bars and background — black on white is the most reliable combination
- Not testing barcodes with multiple scanners before mass printing
- Encoding invalid characters for the chosen symbology (e.g., letters in a numeric-only format)
- Distorting barcode proportions by resizing without maintaining aspect ratio
Frequently Asked Questions
Everything you need to know about generating barcodes with ForgePlug
Which format should I actually pick if I just need 'a barcode'?
Can I use an EAN-13 or UPC-A barcode I generate here on an actual retail shelf?
My printed barcode won't scan at the register — what's wrong?
What's ITF-14 for, and do I need it?
Can I get a print-ready file instead of just an image?
Is there a watermark or usage restriction on generated barcodes?
Picking the right barcode format (and why most people default to the wrong one)
CODE128 is usually the right answer unless a specific system demands something else.
The question I get most from people using this tool isn't how to generate a barcode — it's which format to pick, because there are 10 options and most people just want "a barcode" without knowing the differences matter. They usually do matter, because the scanner or system on the receiving end often expects a specific symbology, not just any barcode that looks right.
How it works
Generation itself is straightforward — JsBarcode takes your input text and the chosen format's encoding rules and draws the corresponding bar pattern, entirely client-side. The part worth understanding is what makes formats different: CODE128 is high-density and handles the full ASCII character set (letters, numbers, symbols), which is why it's the default for general logistics and shipping — it packs the most data into the least space. EAN-13 and UPC-A are fixed-length, numeric-only, retail-specific formats tied to actual product registration through GS1 — you can generate a UPC-A-shaped barcode here for free, but if you want it to scan as a legitimate registered product at a real point-of-sale system, the number itself needs to come from a GS1-issued company prefix, not just any 12 digits. CODE39 is older, lower-density, and letters/digits-only, but it's still what a lot of government, automotive, and healthcare systems specifically require because their scanning hardware was built against that spec decades ago and never changed.
A real example
Say you're labeling internal inventory bins in a small warehouse — not retail products, just "which shelf is this on." CODE128 with a string like "BIN-A14-03" encodes that cleanly, scans fast, and doesn't require registering anything with anyone. Compare that to putting an actual consumer product on a retail shelf: that needs a real EAN-13 or UPC-A with a GS1-registered prefix, or the barcode will scan at checkout as either an error or, worse, as someone else's already-registered product.
Common mistakes
- Using EAN-13/UPC-A for internal or non-retail purposes and assuming it needs to be "correct" like a real product code. For internal use, CODE128 is simpler and doesn't carry the assumption of being a globally unique registered number.
- Printing barcodes too small. Below about 1.5 inches wide, bar widths get thin enough that ordinary retail scanners start missing reads, especially on CODE39 which is already lower density than CODE128. If scans are failing at a register, size is often the actual problem, not the barcode data.
- Low contrast color choices. A barcode in dark blue on a light gray background might look fine to your eye and fail constantly on a scanner. Stick to black bars on white or very light backgrounds unless you've actually tested the specific scanner you'll be using.
Frequently Asked Questions
Everything you need to know about generating barcodes
Which format should I actually pick if I just need 'a barcode'?
Can I use an EAN-13 or UPC-A barcode I generate here on an actual retail shelf?
My printed barcode won't scan at the register — what's wrong?
What's ITF-14 for, and do I need it?
Can I get a print-ready file instead of just an image?
Is there a watermark or usage restriction on generated barcodes?
Tool Overview
A closer look at Barcode Generator — how it works, who it's for, and where it fits in your workflow.
Barcodes are the invisible workhorses of retail, logistics, and inventory: a machine-readable series of lines and spaces that encode product identifiers so scanners can look them up instantly. The Barcode Generator produces professional, print-ready barcodes for ten major symbologies — CODE128, CODE39, EAN-13, EAN-8, UPC-A, UPC-E, ITF-14, MSI, Pharmacode, and Codabar — covering everything from retail point-of-sale (EAN/UPC) to warehousing and pharmaceuticals.
Each format includes validation tuned to its standard, with helpful messages when your input doesn't fit — for example, checking that an EAN-13 is exactly 12 digits plus its check digit. You control width, height, quiet-zone margin, and the human-readable text beneath the code, including font and position. Real-time preview shows every change as you make it, and export covers PNG, SVG, or JPEG with optional high-resolution output so labels stay crisp whether they're printed on a thermal printer or a large-format press.
Barcodes frequently encode SKUs and serial numbers that you may not want indexed, so generation runs entirely in your browser. Nothing you create is uploaded — no account, no tracking, no watermark on your labels.
Key Features
Everything you get with this tool, at a glance.
10 Symbologies
CODE128, CODE39, EAN-13/8, UPC-A/E, ITF-14, MSI, Pharmacode, Codabar.
Standard Validation
Check digits and input rules enforced per format with friendly errors.
Print-Ready Controls
Width, height, quiet zone, fonts, and text position fully configurable.
High-Resolution Export
PNG, SVG, or JPEG at any scale — crisp on thermal and offset printing.
Retail Standards Ready
EAN/UPC compliance for point-of-sale, ITF-14 for outer case labeling.
Local Generation
Barcodes are rendered in-browser with JsBarcode — nothing uploaded.
How to Use Barcode Generator
Get from zero to done in four quick steps — no account, no learning curve.
Choose a symbology
Pick the standard your use case requires — EAN/UPC for retail, CODE128 for general use.
Enter the value
Type the product code or serial number; validation guides you to a correct value.
Tune the layout
Adjust size, margins, and the human-readable text for your label size.
Download & print
Export as SVG or high-res PNG and print at the size your workflow needs.
Practical Examples
Real input and output pairs so you know exactly what to expect.
EAN-13 retail label
Input
Value: 5901234123457
Output
Valid EAN-13 → scannable at point of sale
CODE128 for shipping
Input
Value: 1A-2026-8841
Output
Valid CODE128 → warehouse scanners read it
Invalid check digit
Input
Value: 5901234123458 (wrong check digit)
Output
⚠ Validation flags the incorrect check digit
Guides & Articles
Learn how to get the most out of this tool with our in-depth guides.
Barcode Formats Explained: CODE128, EAN, UPC, and When to Use Each
Not all barcodes are the same — CODE128, EAN-13, UPC-A, Code 39, and ITF-14 each serve different purposes. Here's how to pick the right format.
Barcodes for Inventory and Shipping: A Small-Business Primer
You don't need a warehouse system to benefit from barcodes — SKU labels, shipment tracking, and asset tags all start with a simple one.
Part of Business Essentials
Was this tool helpful?
Your feedback helps us improve Barcode Generator for everyone.
Share this tool
