Barcode Generator
Generate barcodes in multiple formats: Code128, EAN-13, UPC-A, Code39, and more.
EAN-13 requires exactly 13 digits. UPC-A requires 12 digits.
How to use Barcode Generator
Enter Your Data
Click the 'Data Input' text field and type the number or text you want to encode. For EAN-13, enter exactly 13 digits. For UPC-A, enter 12 digits. For Code128 and Code39, enter up to 80 characters.
Select Barcode Format
Click the 'Format' dropdown menu and choose your barcode type: Code128, EAN-13, UPC-A, Code39, or Codabar. Each format appears with its recommended use case and digit requirements.
Customize Appearance
Adjust the barcode size using the 'Width' and 'Height' sliders (50-500 pixels). Toggle 'Include Text Label' to show numbers below the barcode. Set bar color with the color picker.
Generate Barcode
Click the blue 'Generate Barcode' button. Your barcode appears instantly in the preview window on the right side of the screen.
Download Your Barcode
Click 'Download as PNG' or 'Download as SVG' button below the preview. Choose PNG for printing or SVG for scalable graphics. File downloads to your device immediately.
Related Tools
Free barcode generator online: create scannable barcodes in your browser
Free barcode generator online: create scannable barcodes in your browser
Need a barcode for a product label, inventory system, event ticket, or asset tag? Use the free barcode generator on ToolHQ to create scannable barcodes in multiple formats and download them as PNG files instantly.
Barcodes encode numbers and text as machine-readable patterns of lines and spaces. They are used in retail, warehousing, healthcare, events, and asset management to identify items faster and more accurately than manual entry.
Generated entirely in your browser. No data is sent anywhere.
Key Takeaways
- Generate barcodes in Code 128, EAN-13, UPC-A, Code 39, and other standard formats
- Barcodes are generated entirely in your browser, no data is sent to any server
- Different use cases need different barcode types: retail products use EAN/UPC, internal systems use Code 128
- Download as PNG for printing on labels, signage, or digital documents
- No account or sign-up required
What barcodes are and how they work
A barcode encodes data, typically numbers or a short text string, as a pattern of parallel lines of varying widths and spaces. A scanner or camera reads the pattern by measuring the widths of the bars and spaces and mapping them to a character encoding. Different barcode symbologies use different encoding rules, which is why a Code 128 scanner will not read a QR code.
According to Wikipedia's barcode article, barcodes were first commercially used in grocery stores in the 1970s when the Universal Product Code (UPC) was standardized. They have since expanded across virtually every industry involving physical goods, documents, or identification.
The organization that governs retail barcode standards globally is GS1, which manages the numbering systems behind EAN-13 and UPC-A codes. If you are creating barcodes for products that will be sold in retail stores or listed on major marketplaces, your barcodes need to use GS1-registered prefixes to be globally unique and compliant.
For internal use, such as inventory tracking, asset tagging, or document management within your own organization, you can generate barcodes with any values you choose.
Which barcode type should you use?
The right barcode format depends on what you are encoding and where it will be scanned. Here is a practical guide to the most common symbologies.
Barcode type comparison
| Barcode type | Encodes | Characters | Common use |
|---|---|---|---|
| Code 128 | Text + numbers | Up to 128 ASCII | Shipping labels, internal inventory, logistics |
| EAN-13 | Numbers only | 13 digits | Retail products sold internationally |
| UPC-A | Numbers only | 12 digits | Retail products sold in USA and Canada |
| EAN-8 | Numbers only | 8 digits | Small product labels with limited space |
| Code 39 | Alphanumeric | Capital A-Z, 0-9, symbols | Industrial, automotive, government, military |
| ITF-14 | Numbers only | 14 digits | Cartons and shipping cases (outer packaging) |
Code 128 is the most versatile for general purposes. It encodes the full ASCII character set, produces compact barcodes, and is readable by virtually every scanner. Use it for inventory management, asset tagging, library systems, and any internal identifier.
EAN-13 and UPC-A are for retail products that will be scanned at point-of-sale. These require registered GS1 prefixes to ensure global uniqueness. If you are a small seller on your own platform or a farmers market, you can generate test codes for practice. For commercial retail distribution, get a GS1 prefix first.
Code 39 remains popular in industries that adopted barcodes early, such as automotive, military, and government supply chains. It does not need a checksum, which simplified early scanner implementations.
When to use a barcode generator
Small business product labeling. If you sell handmade goods, refurbished equipment, or products through your own store, a barcode helps you track inventory and print professional labels. For internal tracking, generate any number series you choose.
Event management. Event organizers use barcodes on tickets for quick scanning at entry. Each attendee gets a unique barcode; scanners at the door verify and mark tickets as used.
Asset tracking. IT departments, equipment rental companies, and facilities managers use barcodes on assets like laptops, tools, and furniture. Scanning a barcode instantly pulls up the item's record without manual search.
Document management. Legal, medical, and financial offices use barcodes on document folders to route them through workflows and retrieve them from physical archives without manually sorting.
Library and lending systems. Libraries and tool libraries use barcodes on items and member cards to track loans and returns quickly.
Take Nina, who ran a small pottery studio that sold directly through her own website and at local markets. She was tracking inventory in a spreadsheet but struggled at market stands where she needed to quickly look up stock levels and ring up sales. She generated Code 128 barcodes for each of her 40 products using the barcode generator, printed them on adhesive labels from her home printer, and attached them to each item. Her phone's barcode scanning app linked each code to her product spreadsheet. Checkout at markets became a 5-second scan instead of a 2-minute manual search.
How to use the ToolHQ barcode generator
Generating a barcode takes under a minute.
- Enter your barcode value. Type the number or text you want to encode. Check the format requirements for your chosen barcode type (for example, EAN-13 requires exactly 13 digits).
- Select your barcode type. Choose the symbology from the dropdown: Code 128, EAN-13, UPC-A, Code 39, or others depending on what is available.
- Generate. The barcode renders instantly in your browser. Nothing is sent to any server.
- Download. Save the barcode as a PNG image file for use in labels, documents, or signage.
Generated entirely in your browser. No account is needed.
For related tools, the QR code generator creates 2D QR codes for URLs, contact information, and Wi-Fi credentials. To add the barcode to a document, the image compressor can reduce the PNG file size before printing.
Barcodes vs QR codes: when to use each
Both barcodes and QR codes encode data for machine reading, but they serve different situations.
| Feature | Traditional barcode | QR code |
|---|---|---|
| Orientation | Scan in one direction | Scan in any direction |
| Data capacity | Typically 20-30 characters | Up to 3,000 characters |
| Error correction | None or minimal | Built-in, 4 levels |
| Scanner required | Dedicated laser scanner or camera | Smartphone camera |
| Common use | Retail, logistics, ID | URLs, payments, Wi-Fi, marketing |
Use a traditional barcode when you have existing scanner infrastructure in a warehouse, store, or logistics system that already uses laser scanners. Use a QR code when you want smartphone-scannable codes that link to URLs or carry more data.
Daniel was organizing a 500-person conference. He needed to issue tickets and manage entry scanning on the day. He generated a unique Code 128 barcode for each attendee using their registration ID as the encoded value. He included the barcode in each attendee's confirmation email as a PNG image they could print or show on a phone screen. At the venue, volunteers used a barcode scanner app on tablets to check people in. The whole entry process moved quickly: each scan took under 3 seconds and automatically marked the registration as checked in. He had originally planned to use manual printed lists but the barcode system saved an estimated 90 minutes of check-in time.
Frequently asked questions
What is the most commonly used barcode format?
Code 128 is the most universally compatible format for general business and logistics use. EAN-13 and UPC-A are standard for retail products. Code 39 is widely used in industrial and government applications.
Do I need to register my barcodes with GS1?
Only if your products will be sold in retail stores or listed on major marketplaces like Amazon or large grocery chains, which require GS1-registered numbers to ensure global uniqueness. For internal inventory tracking within your own business, you can use any values you choose.
Can I print the generated barcode on labels?
Yes. Download the PNG file and include it in your label design. Most label-printing software and standard word processors accept PNG images. Scale up without quality loss by using SVG format if your tool supports it.
What scanners can read these barcodes?
Standard 1D barcode scanners read Code 128, Code 39, EAN, and UPC barcodes. Smartphone camera apps with barcode scanning support also read these formats. Modern point-of-sale systems, inventory apps, and logistics software support all standard symbologies.
What is the difference between a barcode and a QR code?
A barcode (1D) encodes data as parallel lines in one dimension and is scanned with a horizontal laser. A QR code (2D) encodes data in a grid pattern and can be scanned in any orientation using a camera. QR codes hold more data and work better for smartphone scanning.
The short version
Barcodes are one of the most practical and durable data-entry shortcuts available. Whether you are labeling products, tagging assets, or scanning tickets, a generated barcode turns a manual lookup into a 3-second scan.
ToolHQ's free barcode generator creates barcodes in all standard formats, directly in your browser with no server contact and no account required. Enter your value, choose your type, download the PNG.
For QR codes (2D) instead of 1D barcodes, the QR code generator handles URLs, contact cards, and Wi-Fi credentials.