Free online barcode generator. Create Code 128, EAN-13, EAN-8, UPC-A, Code 39, and ITF barcodes instantly. Download as SVG or PNG — no signup, 100% browser-based.
Last updated
Barcode Generator is a free, browser-based tool
from UseToolSuite's
Generator Tools collection.
All processing happens locally on your device — your data is never uploaded to any server.
Use the tool below, then scroll down for detailed documentation, frequently asked questions, and related resources.
Advertisement
EAN-13: 13 digits (check digit auto-calculated from first 12)
2
100
10
#000000
#ffffff
Preview
Valid
Code 128
Encodes full ASCII (0–9, A–Z, a–z, symbols). Used in shipping, supply chain, and general-purpose labeling.
What is the Barcode Generator?
The Barcode Generator is a fast, entirely browser-based tool that enables developers, retailers, and logistics professionals to create standard 1D barcodes instantly. Unlike online generators that transmit your data to remote servers—posing security risks for sensitive product identifiers—this tool guarantees 100% privacy by running locally on your device. It supports all major linear symbologies including Code 128, EAN-13, UPC-A, Code 39, ITF-14, and Pharmacode. Developers benefit from immediate scalable vector graphics (SVG) generation or high-resolution PNG downloads, ensuring crisp, professional print quality without relying on external APIs or paid subscriptions.
How does it work?
This tool leverages the powerful JsBarcode library to calculate and render barcode patterns dynamically within your browser. When you enter a string of characters and select a symbology, the JavaScript engine parses the data, applies the specific encoding rules for the chosen format (including auto-calculating check digits for EAN/UPC), and constructs the bars directly into an SVG DOM element. No server round-trips are required.
Common use cases
1. Generating standard EAN-13 or UPC-A barcodes for retail product packaging and price tags. 2. Creating robust Code 128 labels for warehouse inventory management and internal asset tracking. 3. Prototyping scannable ticket codes for event management applications during local development.
Linear barcodes, by purpose
A barcode is a machine-readable encoding of a number or string. The right symbology depends entirely on what you’re encoding and where it’s scanned:
Symbology
Encodes
Typical use
Code 128
Full ASCII
Logistics, internal tracking
EAN-13
13 digits
International retail products
UPC-A
12 digits
North American retail
Code 39
A–Z, 0–9, few symbols
Automotive, defense, ID
ITF
Even digit count
Shipping cartons
This generator validates format and computes check digits automatically, so an EAN-13 you enter 12 digits for gets the correct 13th digit appended.
Export as SVG for print
Always download barcodes as SVG (or high-resolution PNG) when they’ll be printed. Barcodes are scanned optically, and a low-resolution or scaled-up raster develops blurry bar edges that scanners misread. SVG is vector — it stays razor-sharp at any print size, which is exactly what reliable scanning needs. For professional print, treat 300 DPI as the floor.
Why a barcode fails to scan
Scan failures almost always trace to physical/print issues, not the data:
Contrast — needs solid black bars on a solid white background; gray-on-gray fails.
Size — EAN-13 has a minimum width (~25mm); too small and the bars blur together.
Quiet zone — the blank margin on either side is required; cropping it breaks scanning.
Screen glare — scanning a barcode off a glossy screen is unreliable; print it.
This tool’s automatic check-digit validation rules out the data-side errors, leaving these print/display factors as the things to get right.
QR vs barcode
If you need to encode a URL, contact info, or a lot of text rather than a product number, a 2D QR code holds far more data and scans easily from phone screens — use the QR Code Generator for that. Linear barcodes are for short numeric/alphanumeric identifiers in retail and logistics.
How helpful was this tool?
Click to rate
Awesome! Glad it helped.
We don't have a marketing budget. The best way to support this free tool is by sharing it with other developers!
Help us improve!
Sorry it didn't meet your expectations. We're always looking to make these tools better. What was missing or broken?
Essential terms and definitions related to Barcode Generator.
Code 128
A high-density linear barcode symbology capable of encoding all 128 ASCII characters. It uses three subsets (A, B, C) that can be combined within a single barcode for optimal density. Code 128 is one of the most versatile barcodes, widely used in shipping, logistics, healthcare, and retail for its ability to encode variable-length alphanumeric data.
EAN-13 (European Article Number)
A 13-digit barcode standard maintained by GS1, used for retail product identification worldwide. The 13 digits encode a GS1 company prefix (3–8 digits), item reference, and check digit. The first two or three digits indicate the country's GS1 member organization, not the country of origin. EAN-13 is the international standard; UPC-A (12 digits) is its North American predecessor.
Check Digit
A digit appended to barcode data that allows scanners to verify the integrity of the scanned data. It is calculated from the preceding digits using a modulo algorithm. If a scanner reads a barcode and the check digit calculation does not match, the scan is rejected. This prevents misreads caused by partial scans, damaged barcodes, or label printing errors.
Frequently Asked Questions
What is the difference between Code 128, EAN-13, and UPC-A?
Code 128 is a high-density linear barcode that can encode the full ASCII character set — it is used in shipping labels, supply chain management, and general-purpose applications. EAN-13 (European Article Number) is the international standard for retail product identification, encoding a 13-digit number including country code, manufacturer code, and product code. UPC-A (Universal Product Code) is the North American retail standard, encoding 12 digits. EAN-13 is essentially a superset of UPC-A. Choose Code 128 for logistics and internal tracking; EAN/UPC for retail products.
Can I download the barcode as a vector SVG?
Yes. SVG (Scalable Vector Graphics) download is the recommended format because barcodes scale to any size without pixelation — critical for printing. PNG download is also available at specified resolutions. For professional printing, always use SVG or high-resolution PNG (300 DPI equivalent). Low-resolution barcodes can fail to scan on barcode readers.
What characters can I encode in each barcode format?
Code 128 supports all 128 ASCII characters including uppercase, lowercase, digits, and symbols. Code 39 supports 43 characters: A–Z uppercase, 0–9, and seven special characters (-, ., $, /, +, %, space). EAN-13 and EAN-8 encode only digits. UPC-A encodes only digits. ITF (Interleaved 2 of 5) encodes only even-count digit strings. Select your barcode type based on what data you need to encode.
Do I need to register or obtain a prefix for EAN/UPC barcodes?
For official retail products sold through major retailers, you need a legitimate GS1 company prefix obtained from GS1 (the standards body). This ensures your EAN/UPC numbers are globally unique. However, for internal use — warehouse tracking, event tickets, library systems, internal inventory — you can use any valid number without registration. This generator creates the barcode visual from any digit string you provide.
Why does my barcode fail to scan?
Common scanning failures result from: insufficient contrast (ensure black bars on white background, not gray-on-gray), too small print size (minimum 25mm wide for EAN-13), digital display reflections (glossy screens can confuse optical scanners — print for reliable scanning), invalid data (EAN-13 requires exactly 13 digits with valid check digit), and printer/display resolution below 150 DPI. This generator validates data format and check digits automatically.
Which barcode type should I use?
Match the symbology to the job. Code 128 — the versatile default for internal use, shipping, logistics, and asset tracking; it encodes the full ASCII set (letters, digits, symbols) at high density. EAN-13 / UPC-A — the RETAIL standards for products scanned at a checkout; EAN-13 (13 digits) is the international standard and UPC-A (12 digits) its North American subset, both digits-only and requiring a valid check digit. Code 39 — older, encodes A–Z, 0–9 and a few symbols; still common in automotive and defense but lower density than Code 128. ITF (Interleaved 2 of 5) — digits-only, used on shipping cartons. EAN-8 — a compact 8-digit version for tiny packages. Rule of thumb: Code 128 for anything internal/alphanumeric, EAN/UPC for products sold in stores.
Do I need to buy a barcode number from GS1 for my product?
It depends on where the product is sold. For products sold through major RETAILERS or online marketplaces (Amazon, supermarkets), yes — you need a legitimate GS1 company prefix from GS1, the global standards body, which guarantees your EAN/UPC numbers are unique worldwide. Retailers and marketplaces verify ownership against the GS1 database, so a made-up number will be rejected and can get your listing pulled. For INTERNAL use, however — warehouse and inventory tracking, library systems, event tickets, asset tags, your own closed system — you can use ANY valid number with no registration, since uniqueness only matters within your own system. This generator creates the barcode VISUAL from whatever digits you provide; it doesn't assign or register GS1 numbers.
Troubleshooting & Technical Tips
Common errors developers encounter and how to resolve them.
EAN-13 barcode shows an error about invalid data
EAN-13 requires exactly 13 digits (0–9 only). The 13th digit is a check digit calculated from the first 12. If you enter 12 digits, the generator automatically appends the correct check digit. If you enter all 13 digits, the check digit must be mathematically valid. No letters, spaces, or symbols are allowed in EAN-13.
Generated barcode does not scan with my phone
Ensure sufficient contrast and size. For screen scanning, increase the barcode scale to maximum and turn up screen brightness. Avoid scanning through screen protectors with high reflectivity. Most phone camera barcode apps require the barcode to occupy at least 20% of the camera frame. Code 128 and QR codes generally scan more reliably from screens than EAN/UPC formats.
Related Guides
In-depth articles covering the concepts behind Barcode Generator.
We use cookies to show personalized ads via Google AdSense.
All our tools process data locally in your browser — no personal data is collected.
You can accept personalized ads or continue with general ads only.
Privacy Policy