Barcode Generator
Generate Linear Barcodes
Barcode Preview
What is a Barcode?
A barcode is a machine-readable representation of data printed as a pattern of parallel lines, geometric shapes, or dots. The core principle is simple: encode information into a visual format that optical scanners can read with near-perfect accuracy. Instead of typing product codes, tracking numbers, or patient IDs manually, a scanner captures the encoded data in milliseconds.
Barcode technology works through a combination of symbol structure and optical reading. Each barcode symbol contains alternating dark elements (bars) and light elements (spaces) of varying widths. The dark bars absorb light while the light spaces reflect it. A barcode scanner emits a beam of light across the symbol and measures the reflection pattern. The scanner's decoder then translates these width variations into the corresponding characters based on the symbology's encoding rules.
The distinction between one-dimensional and two-dimensional barcodes matters for practical applications. 1D barcodes store data horizontally, encoding information in the width and sequence of bars and spaces. These are what most people picture when they think of barcodes. 2D barcodes encode data both horizontally and vertically using patterns of squares, dots, or other geometric shapes. This vertical dimension allows 2D symbols to store substantially more data in a smaller area.
Businesses rely on barcodes because they eliminate manual data entry errors. A skilled typist makes roughly one error per 300 keystrokes. A properly printed and scanned barcode produces an error rate of approximately one in several million scans. This accuracy, combined with the speed of scanning versus typing, explains why barcode adoption continues decades after the technology first appeared.
The type of information a barcode can store depends on the symbology. Basic 1D barcodes typically encode numeric or alphanumeric identifiers such as Global Trade Item Numbers, serial numbers, or batch codes. More sophisticated symbologies can encode full ASCII character sets, including punctuation and control characters. 2D barcodes can store structured data like contact information, URLs, payment instructions, or entire shipping manifests.
Barcode scanners read symbols through several technologies. Laser scanners use a moving beam that sweeps across the barcode, measuring reflected light intensity. CCD scanners capture the entire barcode image at once using an array of light sensors. Camera-based imagers take a digital photograph of the symbol and use software algorithms to locate, orient, and decode it. Each technology has different capabilities for reading damaged codes, handling curved surfaces, or scanning at distance.
Benefits of Using Barcode Technology
Faster checkout results from scanning rather than manual entry. A cashier can scan a UPC symbol in under a second, whereas typing a 12-digit number takes several seconds and invites error correction.
Inventory accuracy improves because cycle counts and receiving processes become scan-based. Warehouse staff scan shelf labels and pallet tags rather than reading and transcribing numbers. Real-time inventory systems update stock levels at the moment of scan, eliminating the lag between physical movement and system recording.
Warehouse automation depends on barcodes for sortation systems, automated storage and retrieval, and conveyor routing. Scanners positioned along conveyor lines read barcodes on passing cartons and direct them to the correct shipping lane or storage location without human intervention.
Reduced manual errors translate directly to cost savings. Mis-shipments, incorrect patient medication administration, and inventory discrepancies trace back to data entry mistakes that barcodes prevent.
Asset tracking assigns a unique barcode to equipment, tools, IT hardware, or furniture. Scanning the barcode during physical audits confirms location, condition, and assignment status. This practice reduces asset loss and simplifies depreciation calculations.
Product identification through GTINs encoded in EAN or UPC barcodes enables global trade. A product manufactured in one country can be scanned and identified correctly in retail systems worldwide because the numbering system is standardized.
Shipping efficiency relies on barcoded tracking numbers that carriers scan at each handling point. Customers receive real-time status updates because every scan updates the tracking database. The same barcodes enable automated sorting at carrier hubs.
Healthcare safety protocols use barcodes for patient wristbands, medication vials, and specimen collection tubes. Scanning the patient wristband and the medication barcode verifies the five rights of medication administration: right patient, right drug, right dose, right route, and right time.
Manufacturing traceability requires barcodes to track raw materials through production to finished goods. When a defect is discovered, the manufacturer can identify all affected units by scanning production records linked to batch barcodes.
Retail stock management uses barcodes for receiving, shelf replenishment, price markdowns, and inventory counting. Staff with handheld scanners can conduct full store inventories without closing for business.
Industries That Use Barcodes
Retail
Point-of-sale scanners read UPC-A and EAN-13 symbols at checkout, triggering price lookup and automatic inventory deductions. Code 128 appears on shelf labels for variable-weight items like deli products where the barcode encodes both product identification and item weight.
Supermarkets
Supermarkets use EAN-13 on packaged goods, ITF-14 on case cartons for backroom inventory, and GS1 DataBar on fresh produce to encode GTIN plus sell-by dates. The first UPC scan occurred at an Ohio supermarket in 1974.
E-commerce
Fulfillment centers scan barcodes during receiving, pick, pack, and ship operations. Workers verify order accuracy by scanning items before sealing cartons. Shipping labels carry Code 128 tracking numbers, and returns processing links merchandise back to original orders.
Warehousing
Location barcodes on rack positions combine with pallet and item barcodes for inventory tracking. Forklift operators scan both location and pallet during putaway and retrieval. Cycle counting programs direct staff to scan specific locations for physical verification.
Logistics
Logistics providers scan barcodes at origin terminals, intermediate hubs, and destination stations. Each scan timestamps custody records. Freight forwarders apply GS1-128 labels encoding the Global Shipment Identification Number on pallets and containers.
Shipping
Carriers print tracking numbers as GS1-128 or Code 128 barcodes. High-speed sorting equipment reads these barcodes to route packages to correct destination lanes. Postal services use specialized symbologies like USPS Intelligent Mail for automated processing.
Manufacturing
Work-in-process tracking uses barcode-labeled travelers following batches through production. Operators scan travelers and work centers at each step, building electronic batch records. Finished goods receive GS1-compliant labels for supply chain identification downstream.
Pharmaceutical Industry
Serialization regulations require GS1 DataMatrix encoding GTIN, serial number, batch, and expiration date on individual packages. Wholesalers verify serial numbers against manufacturer databases. The US Drug Supply Chain Security Act mandates this track-and-trace capability.
Healthcare
Patient wristbands carry Code 128 or PDF417 barcodes. Nurses scan wristbands against medication barcodes to verify the five rights of administration. Blood banks label units with ISBT 128 barcodes encoding donation ID, blood group, and product code.
Medical Laboratories
Specimens arrive with barcoded labels from the laboratory information system. Automated analyzers read barcodes to determine required tests and link results to patient records. Histology labs track tissue cassettes and slides through processing using barcode identification.
Automotive
Component traceability relies on Data Matrix codes laser-etched onto engine blocks and electronic modules. Assembly lines scan these against vehicle identification numbers to confirm correct part installation. Aftermarket parts carry barcodes for OEM authenticity verification.
Libraries
Books and media carry Code 39 or Codabar barcodes linked to bibliographic records. Checkout requires scanning the patron card and item barcode. Shelf-reading inventory uses handheld scanners to verify items sit in correct call-number order.
Airlines
Boarding passes display PDF417 or Aztec Code symbols encoding passenger and flight data. Gate scanners validate boarding eligibility. Baggage tags carry Interleaved 2 of 5 barcodes that direct bags through automated sortation systems at airport hubs.
Postal Services
National postal operators use specialized 4-state symbologies for delivery point sorting. USPS Intelligent Mail encodes ZIP codes, tracking, and mail class in 65 bars. Royal Mail 4-State encodes UK postal codes for access to discounted postage rates.
Government
Document tracking, ID cards, vehicle registration, and military logistics all use barcodes. Defense supply chains apply MIL-STD-129 labeling with Code 39. Tax processing systems use barcoded payment coupons for automated remittance handling.
Banking
Payment coupons carry Code 128 or Interleaved 2 of 5 barcodes encoding account numbers and amounts due. Lockbox services scan incoming remittances for automated processing. Some countries use barcode-encoded routing information on bank checks for clearing systems.
Education
Student ID cards carry Code 39 or Code 128 barcodes for attendance tracking, cafeteria payment, and building access. Examination papers receive barcoded candidate numbers for anonymous grading. Textbook inventory systems use ISBN-derived barcodes for distribution management.
Food Production
Lot barcodes link finished products to raw material sources and processing dates. When food safety issues arise, manufacturers identify affected products by lot barcode and issue targeted recalls. GS1-128 case labels encode GTIN, batch, and production date.
Agriculture
Harvest bins carry barcode tags recording pick date, field location, and crew identification. Packing houses scan these to assign lot numbers for traceability compliance. Seed companies label varieties with barcodes for inventory control and regulatory documentation.
Electronics
Serial number barcodes follow devices through distribution for warranty verification. High-value circuit board components carry micro Data Matrix codes for traceability. Anti-counterfeiting programs use 2D barcodes linked to authentication databases for product verification.
Hospitality
Hotels use barcodes on room keys, luggage tags, and inventory items. Convention badges include barcoded access control. Restaurant chains label ingredient containers with barcodes for expiration date tracking. Housekeeping staff scan room barcodes to update cleaning status.
Event Ticketing
Printed and mobile tickets use PDF417, QR Code, or Aztec Code encoding unique identifiers. Venue access systems validate each barcode at entry to prevent duplicate use. Festival wristbands with barcodes enable cashless payment and restricted area access control.
Asset Management
Organizations tag equipment, tools, and IT hardware with unique barcodes. Physical audits scan these tags to verify location and assignment. The scan data feeds into depreciation calculations and loss prevention reports, reducing ghost assets on financial records.
Choosing the Right Barcode
For retail products sold through stores, UPC-A (US and Canada) or EAN-13 (most other countries) are the required symbologies. Retailers expect these barcodes and their point-of-sale systems are configured specifically for them. You must obtain a GS1 company prefix to create valid GTINs for these barcodes.
For logistics and shipping labels, GS1-128 is the standard. It encodes the Serial Shipping Container Code (SSCC) for pallet and container identification, plus additional information such as purchase order numbers and shipment references. The GS1-128 symbol meets the labeling requirements of major retailers and logistics providers.
For warehouse inventory where barcodes appear on shelf locations, bins, and equipment, Code 128 offers the best combination of density, ASCII support, and industry acceptance. It produces compact symbols readable by all warehouse scanners.
For healthcare applications, choose symbologies based on the specific use case. Patient wristbands typically use Code 128 or PDF417. Blood products require ISBT 128, a specific Code 128 implementation. Medication administration uses GS1 DataMatrix or GS1-128 depending on package size. Always verify the symbology requirements of the healthcare facility or regulatory body before printing.
For pharmaceutical packaging, GS1 DataMatrix is the global standard for serialization under regulations including the EU Falsified Medicines Directive and the US Drug Supply Chain Security Act. The symbol must encode GTIN, serial number, batch number, and expiration date in GS1 Application Identifier format.
For small labels on medical devices, electronics components, or surgical instruments, Data Matrix or GS1 DataMatrix Rectangular provide high data density in very small areas. Direct part marking with laser or dot-peen creates permanent Data Matrix codes on metal and plastic surfaces.
For product packaging with mobile consumer interaction, GS1 QR Code encodes both the GTIN for supply chain identification and URLs for consumer-facing content such as nutritional information, allergen data, or product registration.
For long data storage where more than 50 characters are needed, 2D symbologies are required. QR Code, Data Matrix, and PDF417 can all encode hundreds or thousands of characters, far exceeding the capacity of any 1D barcode.
For international trade, the GS1 system provides globally unique identification through GTINs encoded in EAN-13, GS1-128, or GS1 DataMatrix. GS1 standards are recognized in over 100 countries, and barcodes created under GS1 rules will scan correctly throughout the global supply chain.
For government requirements, check the specific procurement specifications. Many government agencies mandate specific symbologies: MIL-STD-129 requires Code 39 for defense logistics; AAMVA specifies PDF417 for driver's licenses; and postal services require their national postal symbologies.
Popular Barcode Formats
| Barcode | Common Use |
|---|---|
| UPC-A | Retail products in North America |
| EAN-13 | Global retail products |
| Code 128 | Warehousing and logistics |
| Code 39 | Manufacturing and asset tracking |
| QR Code | URLs, payments, marketing |
| Data Matrix | Medical devices and electronics |
| PDF417 | IDs, boarding passes |
| ITF-14 | Shipping cartons |
| GS1-128 | Supply chain labels |
| GS1 DataMatrix | Pharmaceutical serialization |
Barcode Best Practices
Maintain quiet zones. Every barcode symbology requires blank space, called the quiet zone, on both sides of the symbol. For most 1D barcodes, the quiet zone must be at least 10 times the width of the narrowest bar. Without adequate quiet zones, scanners cannot distinguish where the barcode begins and ends. Never print text, borders, or other elements in the quiet zone area.
Use adequate print resolution. For most 1D barcodes, a minimum print resolution of 203 DPI is recommended. At this resolution, a standard 0.33 mm narrow bar prints cleanly. Lower resolution causes bar edge roughness that increases the likelihood of scan failures. For 2D symbols, 300 DPI or higher produces cleaner module edges and better scanning performance.
Avoid stretching or compressing symbols. Changing a barcode's aspect ratio distorts the bar widths and spaces, breaking the dimensional relationships that decoders rely on. Always scale barcodes proportionally. If a barcode must fit a specific space, choose a different symbology or a higher-density variant rather than compressing the symbol.
Choose proper barcode size. The X-dimension, which is the width of the narrowest bar or module, determines the symbol's scannability. For retail point-of-sale, the standard X-dimension is 0.33 mm. Smaller X-dimensions require higher resolution printing and may fail on rough substrates. Larger X-dimensions produce more tolerant symbols for challenging environments.
Ensure sufficient contrast. The bars or modules must be dark on a light background. Black bars on a white background provide the highest contrast ratio. Avoid colored substrates or inks that reduce reflectance difference, particularly red ink or red labels, since laser scanners use red light that reflects off red surfaces. Thermal transfer printers produce the most consistent contrast for barcode labels.
Test with barcode scanners. The final test of any barcode is whether the intended scanner reads it reliably. Print samples on the actual label stock with the intended printer, then scan under the expected conditions. Verify that the decoded data matches the encoded data exactly. Do not assume that a barcode that looks correct to the eye will scan correctly.
Protect labels from damage. Barcode labels in industrial environments face abrasion, chemicals, moisture, and temperature extremes. Choose label materials and adhesives suited to the application. Direct-marked barcodes on metal parts may require protective coatings. Damaged barcodes produce no-reads or misreads that disrupt operations.
Follow GS1 specifications where required. If you are creating barcodes for retail products, logistics labels, or healthcare applications, the GS1 General Specifications define the symbology, size, placement, and data content requirements. Non-compliant barcodes may be rejected by trading partners or incur non-compliance charges.
Barcode vs QR Code
| Aspect | 1D Barcode (e.g., UPC, Code 128) | QR Code |
|---|---|---|
| Data capacity | Typically 8-48 characters | Up to 7,089 numeric characters |
| Dimensions | Linear (width only) | 2D matrix (width and height) |
| Error correction | Check digit only, no recovery | Up to 30% damage recovery |
| Mobile readability | Requires barcode scanning app | Native smartphone camera support |
| Industrial applications | Retail POS, logistics, warehousing | Product traceability, mobile payments, documents |
| Storage capability | Numeric or limited alphanumeric IDs | URLs, contact cards, text, binary data |
| Printing requirements | Moderate, standard label printers | Requires clean module edges, 300 DPI typical |
| Cost per label | Low, commodity label stock | Same label stock, no cost difference |
| Popular industries | Retail, logistics, healthcare, manufacturing | Marketing, payments, healthcare, automotive |
1D barcodes remain the backbone of retail and logistics because the infrastructure of scanners, databases, and business processes is built around them. A UPC barcode can be read by every checkout scanner, warehouse reader, and inventory device in the supply chain. QR Codes serve applications requiring more data or direct consumer interaction. They are not interchangeable in most business contexts. A retail checkout lane will not read a QR Code from a product package unless the POS system is specifically configured for QR Code product identification, and most are configured only for UPC or EAN.
Common Barcode Mistakes
Wrong barcode type occurs when the selected symbology does not match the application's requirements. Creating a Code 39 barcode for a retail product that requires UPC-A results in a barcode that point-of-sale systems will not recognize. Verify the required symbology before generating.
Invalid product numbers happen when GTINs or UPCs are created without proper registration or check digit calculation. Self-generated numbers may conflict with legitimate GTINs or contain incorrect check digits. Always obtain company prefixes from GS1 and calculate check digits using the standard algorithm.
Poor printing quality produces barcodes with rough edges, voids, or smudges that scanners cannot decode. Thermal printheads that need cleaning, incorrect heat settings, or worn-out ribbons cause these defects. Regular printer maintenance and barcode verification prevent printing-related failures.
Low contrast results from colored substrates, faded ribbons, or insufficient toner density. Barcodes printed on dark backgrounds or with light-colored bars on white labels fail contrast requirements. Use black bars on white labels for maximum reliability.
Missing quiet zones occur when labels are trimmed too close to the barcode or when other printed elements intrude into the required clear space. The quiet zone is part of the barcode specification, and scanners rely on it to locate the symbol boundaries.
Incorrect sizing from compressing or stretching the symbol changes the bar width ratios. A barcode reduced to 70% of its standard X-dimension may become unscannable by standard readers. Maintain the specified X-dimension range for the chosen symbology.
Unsupported characters entered into symbologies with limited character sets cause encoding failures. Code 39 cannot encode lowercase letters. EAN-13 cannot encode letters at all. Check the character set restrictions for the chosen symbology before encoding.
Duplicate identifiers in asset tracking or inventory systems create data integrity problems. If two items share the same barcode, the system cannot distinguish between them. Implement numbering systems that guarantee uniqueness.
Damaged labels from abrasion, chemical exposure, or moisture prevent scanning. Labels that become unreadable in service force manual data entry and create process delays. Match label materials to the operating environment.
Frequently Asked Questions
What is a barcode?
A barcode is a machine-readable pattern of parallel lines, squares, or dots that encodes data for optical scanning. Barcodes allow computers to capture data without manual typing.
How do barcode generators work?
A barcode generator applies the encoding rules of a specific symbology to convert user-entered data into the correct bar and space patterns, calculates any required check digits, and renders the result as an image.
Which barcode should I use for retail products?
UPC-A in the US and Canada, EAN-13 in most other countries. These are the symbologies that retail point-of-sale systems are configured to read.
Can I create barcodes for free?
Yes, this generator creates barcodes without cost. The value comes from the tool's ability to produce properly encoded, standards-compliant barcode symbols.
What is the difference between UPC and EAN?
UPC is a 12-digit system used primarily in North America. EAN is a 13-digit system used globally. A 12-digit UPC converts to a 13-digit EAN by adding a leading zero.
What is Code 128 used for?
Code 128 is used in logistics, shipping, warehousing, and any application requiring compact alphanumeric barcodes. GS1-128, a specific Code 128 implementation, is the standard for supply chain case labels.
What is GS1?
GS1 is a global standards organization that manages the numbering systems used in barcodes, including GTINs, SSCCs, and Application Identifiers. GS1 standards ensure that barcodes are unique and interoperable worldwide.
Can smartphones scan all barcodes?
Smartphones with camera-based scanning apps can read most 2D symbologies including QR Code, Data Matrix, and PDF417. Reading 1D barcodes requires an app designed for linear symbology decoding. Some symbologies, particularly postal barcodes and some industrial codes, are not supported by consumer scanning apps.
Are barcodes unique?
A barcode encodes data; uniqueness depends on the data encoded, not the barcode itself. GTINs registered through GS1 are globally unique. Self-assigned numbers risk duplication across organizations.
Can a barcode contain letters?
Some symbologies support alphabetic characters (Code 128, Code 39, QR Code, Data Matrix). Others are numeric-only (UPC-A, EAN-13, Interleaved 2 of 5). Check the symbology specification for character set restrictions.
Which barcode stores the most information?
Among common symbologies, QR Code stores the most with capacity up to 7,089 numeric characters. PDF417 and Data Matrix also offer high capacity in the thousands of characters.
What barcode is used in hospitals?
Patient wristbands typically use Code 128 or PDF417. Medication labels use GS1 DataMatrix or GS1-128. Blood products use ISBT 128. Laboratory specimens use Code 128 or Data Matrix.
Which barcode is used on shipping labels?
GS1-128, which encodes the SSCC and other logistics information, is the standard on shipping labels. Carrier-specific symbologies like MaxiCode (UPS) and USPS Intelligent Mail also appear on shipping labels.
Can I print barcodes on normal paper?
Yes, but standard office paper produces lower-quality results than label stock. For any barcode that must be scanned reliably, use a thermal transfer or thermal direct printer on label material designed for barcode printing.
Do barcodes expire?
The barcode symbol itself does not expire, but the data it encodes may become obsolete. A barcode encoding a GTIN for a discontinued product remains technically scannable but points to an inactive record.
Are QR codes considered barcodes?
Yes, QR codes are 2D barcodes. The term "barcode" encompasses both linear (1D) and matrix (2D) symbologies.
Can I edit a barcode after creating it?
No. A barcode is a visual representation of specific data. Editing the data requires generating a new barcode. The image cannot be modified to represent different data.
How do I verify whether a barcode is valid?
Use a barcode verifier, which is a calibrated instrument that measures symbol quality against ISO/IEC standards. A verifier reports parameters including contrast, modulation, defects, and decodability. Verification differs from simple scanning; a barcode can scan successfully but still fail verification if it is near the limits of readability.