Barcode Generator
Generate barcodes online for free. Supports CODE128, CODE39, EAN-13, UPC-A, ITF-14, and more. Instant preview with PNG download. No data sent to servers.
How to Use
Barcodes are the backbone of inventory management, retail checkout, shipping logistics, and asset tracking worldwide. This free online barcode generator creates scannable barcodes in multiple formats with instant preview and download. Here is how to use it:
- Select the barcode format from the dropdown menu. Choose CODE128 for general-purpose alphanumeric encoding, EAN-13 or UPC-A for retail products, CODE39 for industrial use, or ITF-14 for shipping containers. Each format has specific character and length requirements.
- Enter the data to encode in the input field. For EAN-13, enter 12 or 13 digits. For UPC-A, enter 11 or 12 digits. For CODE128, enter any ASCII text. For CODE39, enter uppercase letters, digits, and a limited set of special characters (space, dash, period, dollar, slash, plus, percent).
- Preview the barcode as it renders in real time. The generator displays the barcode image immediately as you type, so you can verify the content and appearance before downloading.
- Download the barcode as a high-resolution PNG image. The downloaded image includes the barcode and the human-readable text below it, ready for printing on labels, packaging, or documents.
Format Selection Guide
- CODE128: The most versatile linear barcode. Encodes all 128 ASCII characters including lowercase letters, punctuation, and control codes. Produces compact barcodes with high information density. Ideal for shipping labels, inventory tracking, and any application requiring alphanumeric data.
- CODE39: Encodes uppercase letters A-Z, digits 0-9, and seven special characters. Widely used in automotive, defense, and healthcare industries. Self-checking (no mandatory check digit), making it simple to implement. Lower density than CODE128 but maximum scanner compatibility.
- EAN-13: The international standard for retail products. Encodes exactly 13 digits (12 data digits plus 1 check digit). Required by retailers worldwide for point-of-sale scanning. The first 2-3 digits identify the country of origin.
- UPC-A: The North American retail standard, a subset of EAN-13. Encodes exactly 12 digits (11 data digits plus 1 check digit). Found on virtually every product sold in the United States and Canada.
- ITF-14: Interleaved 2 of 5 format designed for shipping containers and outer packaging. Encodes exactly 14 digits. Uses a distinctive bearer bar (thick border) that helps scanners read barcodes on corrugated surfaces.
About This Tool
The barcode is one of the most impactful inventions in the history of commerce and logistics. The concept was first patented by Norman Joseph Woodland and Bernard Silver on October 7, 1952 (US Patent 2,612,994). Woodland, inspired by Morse code, extended dots and dashes downward into thin and thick lines, creating the first linear barcode symbology. However, the technology had to wait more than two decades for practical implementation. The first commercial barcode scan occurred on June 26, 1974, at a Marsh supermarket in Troy, Ohio, when a cashier scanned a pack of Wrigley's Juicy Fruit chewing gum using a UPC barcode. That pack of gum is now displayed at the Smithsonian National Museum of American History.
Today, over 6 billion barcodes are scanned every day across retail, healthcare, manufacturing, logistics, and government. The GS1 organization manages the global standards for EAN and UPC barcodes, assigning unique company prefixes to manufacturers in over 150 countries. A GS1 company prefix is required to create legitimate retail barcodes, as the prefix ensures that each product barcode is globally unique. For internal inventory, asset tracking, or non-retail applications, any barcode format can be used without a GS1 membership.
How Linear Barcodes Work
A linear (1D) barcode encodes data in the widths of alternating dark bars and light spaces. A barcode scanner projects a laser beam or LED light across the barcode and measures the reflected light intensity. Dark bars absorb light (low reflection) while light spaces reflect it (high reflection). The scanner converts this pattern of reflections into an electrical signal, which is decoded into the encoded characters using the rules of the specific symbology. The height of the bars does not carry data; it exists only to make scanning easier from different angles and distances. Each symbology defines its own encoding rules for mapping characters to bar-space patterns.
CODE128 Deep Dive
CODE128, developed by Computer Identics Corporation in 1981, is the most widely used general-purpose barcode symbology. It encodes all 128 ASCII characters and achieves high density by using three interchangeable code sets. Code Set A covers uppercase letters, digits, and control characters. Code Set B covers uppercase and lowercase letters plus digits. Code Set C covers digit pairs (00-99) at double density, making it extremely efficient for numeric sequences. Intelligent encoders switch between code sets within a single barcode to minimize width. A CODE128 barcode consists of a start character (identifying the initial code set), the encoded data characters, a modulo-103 check digit, and a stop character. This structure ensures reliable scanning even on damaged or poorly printed labels.
Check Digits and Error Detection
Every barcode symbology includes a mechanism for error detection to prevent misreads. EAN-13 and UPC-A use a Modulo 10 check digit algorithm: odd-position digits are multiplied by 1, even-position digits are multiplied by 3, the products are summed, and the check digit is the value needed to bring the total to the next multiple of 10. CODE128 uses a weighted Modulo 103 algorithm where each data character's value is multiplied by its position index. CODE39 uses an optional Modulo 43 check digit. These algorithms detect all single-digit errors and most transposition errors (two adjacent digits swapped), providing reliable scanning across millions of daily transactions.
Why Use This Tool
Barcodes are the universal language of automated data capture. Whether you are managing inventory, shipping products, or tracking assets, barcodes eliminate manual data entry errors and accelerate processing speed. Here is why a barcode generator is an essential tool:
- Inventory and warehouse management -- Barcodes enable real-time inventory tracking across warehouses, stores, and distribution centers. Scanning a barcode takes approximately 0.3 seconds compared to 6-10 seconds for manual data entry, and barcode scanning has an error rate of about 1 in 3 million scans compared to 1 in 300 for manual entry. This speed and accuracy are critical for supply chain operations processing thousands of items daily.
- Retail and point-of-sale -- Every retail product requires a barcode for checkout scanning. EAN-13 barcodes are the global standard used by retailers in over 150 countries, while UPC-A is the primary format in North America. Generating test barcodes is essential for product development, label design proofing, and POS system testing before products reach store shelves.
- Shipping and logistics -- CODE128 and ITF-14 barcodes are required by major shipping carriers (UPS, FedEx, USPS, DHL) and logistics platforms. Shipping labels, packing slips, and container markings all rely on barcodes for automated routing, sorting, and tracking through the supply chain. A single misread can cause a package to be misrouted across continents.
- Asset tracking and identification -- Organizations use barcodes to track fixed assets (computers, equipment, furniture), library books, medical instruments, and documents. CODE39 is particularly popular in government and military asset tracking due to its simplicity and broad scanner compatibility.
- Healthcare and pharmaceuticals -- Hospitals use barcodes on patient wristbands, medication packages, and blood samples to prevent identification errors. The GS1-128 barcode standard (a subset of CODE128) encodes lot numbers, expiration dates, and serial numbers on pharmaceutical products, enabling automated verification at every point in the supply chain.
Privacy and Offline Use
This barcode generator runs entirely in your browser. The data you encode is never transmitted to any server, stored in any database, or logged by any system. This matters because barcodes often contain proprietary product codes, internal SKU numbers, and confidential inventory data. Unlike server-side barcode generators that process your data on remote machines, DevToolKit's client-side approach keeps all data on your device. The tool works fully offline once the page is loaded, making it reliable for use in warehouses, factories, and other environments where internet connectivity may be limited.