Barcode Generator
Barcode Generator
Enter the data to encode in the barcode
Width of individual bars in pixels
Quiet zone around the barcode
Your Barcode Will Appear Here
Select a barcode type, enter your data, and the barcode will generate automatically.
Create 1D and 2D barcodes instantly — download as PNG or SVG
Barcodes are the invisible glue that holds modern commerce together. Whether you manage a small business, run an online store, organize a home library, or simply need to label products for inventory, a reliable barcode generator is an indispensable tool. Our free online Barcode Generator lets you create professional-quality barcodes in seconds — no software to install, no account required, and no watermarks on your downloads. With support for ten symbologies including CODE128, EAN-13, EAN-8, UPC-A, CODE39, ITF-14, Codabar, MSI, Pharmacode, and QR Code, you can generate exactly the right barcode for your use case. Each format has been implemented with automatic check-digit calculation where required, so you never have to worry about producing an unreadable or invalid barcode. The generator works entirely in your browser. When you type or paste your data, the barcode updates in real time so you can see exactly what the final output will look like. You can customize bar width, height, margins, font size, bar color, and background color, then download the result as a crisp vector SVG for professional printing or a pixel-perfect PNG for digital use. A direct copy-to-clipboard feature makes it trivial to paste barcodes straight into documents, spreadsheets, or design files. For product labeling, the most common requirements are EAN-13 (used by retailers worldwide), UPC-A (the North American standard found on almost every consumer product), and CODE128 (a highly compact general-purpose format). If you are labeling shipping cartons or outer cases, ITF-14 is the industry standard because it can be printed directly on corrugated cardboard without the fine-line accuracy that EAN barcodes demand. For asset tracking, library books, or any internal workflow, CODE39 offers the widest scanner compatibility even on low-quality printers. QR codes have become a category of their own. They can encode URLs, Wi-Fi credentials, contact cards, plain text, or any other UTF-8 data, and virtually every smartphone camera can scan them without a dedicated app. Our QR generator lets you choose from four error correction levels — L, M, Q, and H — so you can trade off data capacity against scan reliability. Higher correction levels are recommended when the code will be printed small, placed in a harsh environment, or partially obscured by a logo overlay. One of the most common sources of frustration with barcode tools is check-digit confusion. EAN-13, EAN-8, UPC-A, and ITF-14 all require a specific check digit appended to the data. Our tool calculates and appends this digit automatically — you simply enter the data digits (12 for EAN-13, 7 for EAN-8, 11 for UPC-A, 13 for ITF-14), and the generator produces the complete, valid barcode. Invalid input is caught immediately with a plain-language error message rather than silently generating a broken barcode. Professional printing notes: For retail scanning reliability, the Grocery Manufacturers Association and GS1 recommend a bar width multiplier (X-dimension) of at least 0.33 mm, which corresponds to a bar width setting of 2–3 in this tool at typical screen resolution. Always test-scan a proof before a production print run. SVG output is infinitely scalable and is the recommended format when sending files to a commercial print shop.
Understanding Barcodes and Symbologies
What Is a Barcode Symbology?
A barcode symbology is a specification that defines how data is encoded into a pattern of bars and spaces. Different symbologies are optimized for different purposes. CODE128 encodes the full ASCII character set in a very compact form and is the default choice for shipping labels and general logistics. EAN-13 is the 13-digit barcode mandated by GS1 for consumer products sold in Europe, Asia, and most of the world. UPC-A is EAN-13's 12-digit North American counterpart and appears on virtually every product sold in US and Canadian retail stores. CODE39 trades compactness for simplicity — it can be read by nearly any laser scanner and printed on lower-quality surfaces, making it popular for industrial and government applications. ITF-14 is an interleaved two-of-five code printed on outer shipping cartons. Codabar is a legacy format still used by blood banks and some libraries. MSI (Modified Plessey) is used in warehouse and inventory applications. Pharmacode encodes a single integer for pharmaceutical packaging verification. QR Code is a 2D matrix code capable of storing hundreds of characters in multiple data types.
How Are Check Digits Calculated?
Check digits are the final digit in EAN, UPC, and ITF barcodes. They allow scanners to verify that the barcode was read correctly without sending the data to a server. The algorithm for EAN-13 takes the first 12 digits and alternately multiplies them by 1 and 3, sums the products, and subtracts the last digit of that sum from 10. For example, 978030640615 → (9×1 + 7×3 + 8×1 + 0×3 + 3×1 + 0×3 + 6×1 + 4×3 + 0×1 + 6×3 + 1×1 + 5×3) = 9+21+8+0+3+0+6+12+0+18+1+15 = 93 → check digit = (10 − 3) = 7. UPC-A uses the same algorithm on 11 digits. EAN-8 uses 7 digits with weights 3,1,3,1,3,1,3 from left. ITF-14 uses 13 digits with the same alternating-weight scheme. Our generator applies these algorithms automatically so you never have to compute them by hand.
Why Does Barcode Quality Matter?
A barcode that cannot be scanned reliably causes real business costs. In retail, a failed scan at the point of sale requires manual price lookup, slowing checkout and frustrating customers. In a warehouse, a misread barcode can route a shipment to the wrong location, causing expensive reverse logistics. In healthcare, an unreadable medication label is a patient-safety issue. The key quality factors are quiet zone (the blank margin around the barcode that gives scanners a reference point), bar width consistency, sufficient contrast between bars and background, and correct check digits. Our tool generates barcodes that meet GS1 and ISO 15416 structural requirements when printed at or above the recommended minimum size. Downloading as SVG ensures the barcode remains sharp at any print size, which is critical for small labels.
Limitations and Important Notes
This tool is a client-side browser generator and has a few important limitations to keep in mind. First, it does not register your barcodes with GS1 or any other standards body — if you need a globally unique EAN-13 or UPC-A prefix for retail distribution, you must obtain a GS1 Company Prefix separately before using this tool to generate barcodes for your products. Second, the PNG download is rendered at screen resolution (96 DPI); for commercial printing at small label sizes, always use the SVG download and let your print software handle rasterization at the required DPI. Third, while the check-digit calculation is correct for the standard algorithms, some proprietary or variant barcode schemes used in closed supply chains may have additional requirements not covered here. Finally, QR codes generated here are untracked — there is no analytics or redirect capability unless you encode a URL that is hosted on your own tracking infrastructure.
How to Use the Barcode Generator
Select Your Barcode Type
Choose the symbology from the dropdown. For retail products, use EAN-13 (international) or UPC-A (North America). For general labels, CODE128 is the most versatile. For QR codes — URLs, Wi-Fi, or text — select QR Code.
Enter Your Data
Type or paste the value to encode. For EAN-13, enter 12 digits — the 13th check digit is added automatically. For CODE128 and QR, you can enter any text. Use the Fill Sample Data button to see a valid example for the selected type.
Customize Appearance
Adjust bar width (2–3 is recommended for print), height, margin, font size, bar color, and background color. The barcode preview updates in real time as you change settings. Toggle the text display on or off based on your label design.
Download or Copy
Click Download SVG for print-quality vector output, or Download PNG for digital use. Use Copy to Clipboard to paste the barcode directly into a document or design application. Use Print to send directly to your printer with a clean layout.
Frequently Asked Questions
What is the difference between EAN-13 and UPC-A?
EAN-13 (European Article Number) and UPC-A (Universal Product Code) are closely related retail barcode standards. EAN-13 has 13 digits and is the worldwide standard used in Europe, Asia, Australia, and most other countries. UPC-A has 12 digits and is the traditional North American standard. In practice, UPC-A is a subset of EAN-13 — a UPC-A barcode is equivalent to an EAN-13 barcode with a leading zero. Modern barcode scanners in all countries can read both formats. If you are selling products internationally, EAN-13 is the better choice. For products sold exclusively in the US and Canada, UPC-A is traditionally used, though EAN-13 compatibility is now universal.
Do I need to register my barcode with GS1?
This tool generates valid barcodes according to the technical specifications of each symbology. However, for retail use, the data encoded in an EAN-13 or UPC-A barcode must correspond to a registered GS1 Company Prefix assigned to your business, followed by your own item reference numbers. Without registration, there is a real risk that your barcode number collides with another company's product. GS1 membership and prefix registration are available through your national GS1 organization. For internal-use barcodes — warehouse labels, library books, asset tags, or any closed system where you control the scanners — no registration is needed and you can freely choose your own numbering scheme.
What error correction level should I choose for QR codes?
Error correction level controls how much of the QR code can be damaged or obscured while still remaining scannable. Level L (7% recovery) produces the smallest, densest code and is suitable for clean digital displays where damage is unlikely. Level M (15%) is a practical default for most printed uses. Level Q (25%) is recommended if you plan to overlay a logo in the center of the QR code, as the logo covers some modules. Level H (30%) is best for harsh environments such as outdoor signs or product labels that may be scratched or dirty. Higher correction levels increase the physical size of the code, so balance recovery needs against the available print area.
What is a check digit and why is it automatically calculated?
A check digit is the final digit in EAN, UPC, and ITF barcodes. It is computed from the other digits using a weighted modulo-10 algorithm and allows barcode scanners to verify that the digits were read correctly without a network lookup. If a scanner misreads a single digit due to damage or poor print quality, the check digit will not match the calculation and the scanner will reject the read and try again. Our tool calculates the check digit automatically from the data digits you provide, which eliminates a very common source of invalid barcodes. You only need to provide the data portion — 12 digits for EAN-13, 11 for UPC-A, 7 for EAN-8, and 13 for ITF-14.
Which download format should I use — PNG or SVG?
SVG (Scalable Vector Graphics) is the recommended format for professional printing. An SVG file contains mathematical descriptions of the bars and can be scaled to any size without pixelation, which is critical for small labels where a single blurry bar can make a barcode unreadable. Send SVG files to a print shop or import them into label design software for the sharpest results. PNG is a pixel-based format appropriate for digital use — embedding in emails, websites, spreadsheets, or documents — where the barcode will be displayed at roughly screen resolution. The PNG exported from this tool is rendered at screen resolution (96 DPI), which may appear pixelated if printed at small sizes.
What is CODE128 and when should I use it?
CODE128 is a high-density 1D barcode that can encode the full ASCII character set — letters, numbers, and special characters. It is the most versatile general-purpose linear barcode and is the standard for GS1-128 shipping labels, FedEx and UPS labels, and most non-retail logistics applications. It compresses numeric-only data using Subset C (encoding digit pairs), making it extremely compact for long numeric sequences. CODE128 is a strong default choice when you are not constrained to a specific retail standard because it combines high data density with near-universal scanner compatibility. Use it for internal barcodes, inventory labels, document tracking, and any application where the symbology is not mandated by a trading partner.