What Is a Barcode?
A barcode is a machine-readable visual representation of data — typically product codes, serial numbers, or URLs — encoded as patterns of parallel lines (1D barcodes) or dot matrices (2D barcodes like QR codes). Scanners read them by detecting the pattern of light and dark areas and converting it back to the original data.
Barcodes are used in retail product labeling, inventory management, shipping and logistics, event ticketing, library systems, healthcare asset tracking, and dozens of other industries where fast, accurate data entry is required.
Barcode Types & When to Use Each
| Format | Data Type | Best For |
|---|---|---|
| Code 128 | Any text/numbers | Shipping, logistics, inventory — most versatile |
| Code 39 | Letters + numbers | Industrial, automotive, healthcare |
| EAN-13 | 13 digits | Retail product barcodes (Europe/International) |
| UPC-A | 12 digits | Retail product barcodes (USA/Canada) |
| EAN-8 | 8 digits | Small product packaging |
| QR Code | Text / URL | URLs, contact info, app links |
| ITF-14 | 14 digits | Shipping cartons, GS1 logistics |
For Most Uses: Code 128 is the most flexible 1D barcode — it encodes any combination of letters, numbers, and symbols with no length limit. Start here if you're unsure which format to use.
How to Generate a Barcode
Select Barcode Format
Choose your barcode type from the format dropdown. If unsure, Code 128 works for most general purposes.
Enter Your Data
Type the text or number to encode. The tool validates whether your data is compatible with the selected format (e.g., EAN-13 requires exactly 13 digits).
Customize Size & Colors
Set width, height, bar color, and background color. Toggle the human-readable text below the barcode on or off.
Download
Download as PNG (for digital use), SVG (for print, scales infinitely without quality loss), or PDF (print-ready).
Export Format Guide
- PNG: Best for digital display — websites, apps, email. Fixed resolution; may look blurry if printed very large.
- SVG: Best for print — vector format, scales to any size with perfect sharpness. Use for labels, packaging, and professional printing.
- PDF: Print-ready format. Open in any PDF reader and print at any size without quality loss.
Generate Barcode Free
8+ barcode formats. PNG, SVG, PDF export. Custom size and colors. No signup.
Generate Barcode NowAdding Human-Readable Text to Barcodes
Most 1D barcodes show the encoded value as human-readable text below the bars. This lets people read the code manually when a scanner isn't available. Customize the font size, font family, and position (below or above bars). For shipping labels, the human-readable text below the barcode is required by most carrier standards.
Print-Ready Barcode Output
For product labels and packaging, always use SVG or PDF export. Set the barcode size to match your label dimensions precisely — most retail product barcodes are a minimum of 37.29mm × 26.26mm (EAN-13 standard). Scanners have minimum size requirements — going smaller than recommended minimum sizes causes scan failures at checkout.
ToolMatrix Barcode Generator
Supports 8+ barcode formats (Code 128, Code 39, EAN-13, EAN-8, UPC-A, UPC-E, QR Code, ITF-14). Custom width, height, colors, and text options. PNG, SVG, and PDF download. Validates data format compatibility before generating. Free, no account needed, instant generation.