Barcode Generator
Generate barcodes in 8 formats — Code 128, Code 39, EAN-13, UPC-A, and more
Any text up to 80 characters
Preview
Select a format, enter a value, and click Generate
Format Reference
| Format | Characters | Use Case |
|---|---|---|
| Code 128 | All ASCII | Shipping, packaging, general use |
| Code 39 | A-Z, 0-9, symbols | Automotive, defense, healthcare |
| EAN-13 | 13 digits | International product identification |
| EAN-8 | 8 digits | Small product packages |
| UPC-A | 12 digits | US/Canada retail products |
| ITF-14 | 14 digits | Shipping containers, cartons |
| Pharmacode | 3-131070 | Pharmaceutical packaging |
| Codabar | 0-9, A-D, symbols | Libraries, blood banks, shipping |
About This Tool
Generate Code 128, Code 39, EAN-13, EAN-8, UPC-A, ITF-14, Pharmacode, and Codabar barcodes in your browser, customize size and colors, and download them as PNG or SVG.
Create printable barcodes in eight formats
Linear barcodes are still the backbone of retail checkout, warehouse picking, library circulation, and asset tracking. This generator creates eight common symbologies, checks that your input fits the format before drawing it, and exports the result as a PNG image or a scalable SVG file. It is aimed at small businesses labeling stock, makers preparing packaging artwork, developers testing scanners, and anyone who needs a quick barcode without installing software.
Barcodes are drawn locally in your browser using the open-source JsBarcode library, so the values you enter are not uploaded anywhere.
How to make a barcode
- Select a Barcode Format from the list. The input hint underneath shows what that format accepts.
- Type the Value and click Generate Barcode. If the value does not fit the format, an error explains why.
- Fine-tune the Appearance: bar width (1 to 5 pixels per module), bar height (40 to 200 pixels), font size (8 to 28 pixels), line and background colors, and whether to show the human-readable text below the bars. The preview updates as you change these.
- Click Download PNG for a raster image, Download SVG for a vector file, or Copy to copy the SVG markup for pasting into code or a design tool.
Choosing the right symbology
| Format | Accepts | Typical use |
|---|---|---|
| Code 128 | Any ASCII text, up to 80 characters here | Shipping labels, internal inventory, general purpose |
| Code 39 | A-Z, 0-9, space and - . $ / + % | Industrial, automotive, and government labeling |
| EAN-13 | Exactly 13 digits | Retail products in most of the world |
| EAN-8 | Exactly 8 digits | Small retail packages |
| UPC-A | Exactly 12 digits | Retail products in the US and Canada |
| ITF-14 | Exactly 14 digits | Outer cartons and shipping cases |
| Pharmacode | A number from 3 to 131070 | Pharmaceutical packaging control |
| Codabar | Digits and - $ : / . +, starting and ending with A-D | Libraries, blood banks, some courier systems |
For your own internal labels, Code 128 is usually the best default: it is compact, supports letters and digits, and every modern scanner reads it. Code 39 is less dense but very tolerant of print quality, and this tool converts your input to uppercase automatically because Code 39 has no lowercase letters.
Check digits and retail codes
EAN-13, EAN-8, UPC-A, and ITF-14 end in a check digit, calculated from the other digits with a weighted sum, so a scanner can detect a misread. When you enter the full number, the generator verifies that the final digit is correct and reports an error if it is not. If you see an error on a number you believe is valid, double-check for a typo.
A barcode is only a picture of a number. To sell through retailers, your product numbers generally need to come from GS1, the organization that issues company prefixes for EAN and UPC codes. Inventing a 13-digit number may produce a scannable barcode, but it is not a registered product identifier and may clash with someone else's.
Printing tips
- Prefer SVG for print. Vector output stays crisp at any size. If you need other raster sizes later, the SVG to PNG converter can render it.
- Keep contrast high. Dark bars on a white or light background scan best. Red bars often fail because many scanners use red light.
- Do not squash it. Scaling a barcode unevenly changes the bar ratios and can make it unreadable. Resize proportionally.
- Leave a quiet zone of blank space on both sides of the bars.
- Test with a real scanner or phone app before ordering a large print run.
FAQ
Can I encode a URL in a barcode?
Code 128 can hold a short URL, but phones handle 2D codes far better. Use the QR code generator for links.
Why does my UPC fail validation?
UPC-A needs exactly 12 digits including a valid check digit. Spaces or dashes are not allowed.
Can I generate many barcodes at once?
This tool creates one barcode at a time. For large batches, a spreadsheet plug-in or label software is more practical.