Free Barcode Generator
Create professional barcodes in one second. Code 128, EAN-13, UPC-A and more formats. Download high-resolution PNG or SVG.
Choose Format
Select from Code 128, EAN-13, UPC-A and more
Enter Data
Type the content to encode
Download
Get high-res PNG or vector SVG
Generate Your Barcode
Barcode guide: formats, uses and standards
Barcodes are one of the most widely used tools in global commerce and logistics. Every day, billions of products are scanned using barcodes to track inventory, speed up checkouts, and manage shipments. This free generator lets you create professional barcodes in 6 different formats, ready for printing or digital use.
When to use which format
EAN-13 — The European standard for retail products. Required by all supermarkets and stores in Europe, Asia, and most of the world. If you sell physical products in stores, this is the format you need. Requires GS1 registration to obtain an official company prefix.
UPC-A — The American and Canadian standard. Functionally equivalent to EAN-13 but with 12 digits instead of 13. Required for selling in US and Canadian stores. UPC codes can be converted to EAN-13 by adding a leading zero.
Code 128 — The most versatile format. Supports letters, numbers, and special characters. Ideal for shipping labels, internal inventory, serial numbers, and any application requiring alphanumeric text. No GS1 registration needed.
Code 39 — Used in military (US Department of Defense), logistics, and healthcare. Supports uppercase letters, numbers, and some symbols. Longer than Code 128 for the same data, but widely supported by legacy scanners.
Barcodes for your business
If you run an e-commerce store or physical shop, barcodes are essential for inventory management. You can generate codes for internal use (warehouse, shelves, company assets) without GS1 registration, using Code 128 or Code 39. For retail channels, you'll need to register your EAN/UPC codes with GS1.
Complete your business toolkit with other free tools: the QR code generator for marketing, the margin calculator for pricing, and the invoice generator for billing.
Barcode Guide: How to Choose the Right Format
Most Used Formats in Retail and Logistics
In retail, EAN-13 and UPC-A dominate. EAN-13 (European Article Number) is the worldwide standard: the first 2-3 digits identify the country, the next ones identify the company, then the product, and finally the check digit. UPC-A works identically but has 12 digits and is the standard in the USA and Canada. If you sell physical products, these are the formats you need.
Code 128: The Most Versatile
Code 128 is the recommended format for most use cases. It supports the full ASCII character set (uppercase and lowercase letters, numbers, symbols), is compact, and readable by all modern scanners. It has three subsets: A (uppercase + control characters), B (uppercase + lowercase), and C (compressed numeric pairs). For shipping labels, inventory, and warehouse management, Code 128 is almost always the right choice.
How to Get Official EAN/UPC Codes
To sell in retail chains, marketplaces (Amazon, eBay), or pharmacies, you need registered codes. The process: register your company with GS1 (the global standards organization for barcodes). You'll receive a company prefix (GCP) and can then generate product codes. Cost varies: approximately $250/year for small businesses with fewer than 100 items. For internal use (warehouse, tracking), no registration is needed.
Printing Tips for Scannable Barcodes
To ensure scanner readability: use at least 300 DPI, maintain high contrast (dark bars on light background), leave white space ("quiet zones") of at least 10x the width of the narrowest bar, and always test with a real scanner before production runs. Download in SVG if you need to print at different sizes from the original.
Managing invoices?
Create professional invoices with automatic tax calculation. Free, no signup.
Generate Invoice →Need professional copy for your website?
Generate marketing texts free →Frequently Asked Questions
What is the difference between barcode formats?
Code 128 is the most versatile and supports all ASCII characters. EAN-13 is the European product standard (13 digits). UPC-A is the American standard (12 digits). Code 39 is used in logistics and defense. ITF-14 is for shipping cartons. Codabar is used in libraries and blood banks.
How does the check digit work for EAN-13 and UPC-A?
The check digit is calculated automatically by the generator. EAN-13 requires 12 digits + 1 check digit. UPC-A requires 11 digits + 1 check digit. The calculation follows the GS1 standard: alternating sum × 1 and × 3, modulo 10.
Can I use these barcodes for my products?
The generated barcodes are technically valid. However, to sell in retail stores you need EAN/UPC codes registered with GS1 (the international organization that assigns company prefixes). For internal use, warehouse, or inventory you can use any format without registration.
Which format is best for general use?
Code 128 is the best choice for general use: it supports letters, numbers, and symbols, is compact, and readable by all scanners. If you only need to encode numbers, Code 128 automatically compresses them in mode C.
Is any data sent to a server?
No. Barcodes are generated entirely in your browser using the JsBarcode library. No data ever leaves your device.
What is the difference between PNG and SVG?
PNG is a raster image suitable for web and fixed-size printing. SVG is a vector format that scales without losing quality, ideal for professional printing and graphic design.
What is the difference between a barcode and a QR code?
Barcodes (1D) encode data in vertical bars and hold less information (usually numbers or short text). QR codes (2D) use a grid of squares and can hold URLs, contacts, WiFi, and much more data. Barcodes are more common in retail products.
How do I register an EAN code for my product?
Contact GS1 in your country (e.g., GS1 US, GS1 UK). After registration, you'll receive a Global Company Prefix (GCP) and can assign EAN-13 codes to your products. The annual cost starts at approximately $250 for businesses with fewer than 100 items. The process usually takes 1-3 business days.
What is the minimum print size for a barcode?
For EAN-13, the recommended minimum size is 29.83 × 21.64 mm (80% of nominal size). For Code 128, it depends on the number of characters, but the minimum bar width should be at least 0.264 mm. Always print at 300 DPI or higher and test with a scanner before production.
Can I generate barcodes in bulk?
This tool generates one barcode at a time, but you can quickly repeat the process by changing the value in the input field. For bulk generation (hundreds of codes), consider using a programmatic library like python-barcode or JsBarcode in your code. The barcodes generated here serve well as tests before mass production.
✎ Suggest a change
Try our AI-powered tools
Generate professional texts, emails, bios and slogans in seconds. 10 free credits at sign up — no card needed.