Barcode Generator
Generate a barcode for any text or number for free — no sign-up, no uploads, nothing to install. Supports 9 formats including Code 128, EAN-13, UPC-A, and Code 39. Customize bar width, height, and colors, then download as SVG or PNG in seconds. Everything runs right in your browser so your data never leaves your device.
General-purpose: any ASCII text or numbers
Barcode format
Bar width
Height
Colors
Enter content above to generate a barcode
How It Works
This free barcode generator creates your barcode entirely inside your browser — no file is ever sent to a server. It uses the open-source JsBarcode library, which runs in JavaScript directly on your device.
-
1. Choose a format
Pick the barcode symbology that matches your use case. Code 128 is the safest default — it handles any ASCII character and is accepted by virtually all modern scanners. If you need a retail-ready product barcode, choose EAN-13 (global) or UPC-A (North America). For shipping cartons, select ITF-14.
-
2. Enter your content
Type or paste the text or number you want to encode. The tool validates your input in real time against the rules of the selected format (for example, EAN-13 requires exactly 12 or 13 digits) and shows a live preview the moment you start typing. Everything is processed locally in JavaScript — nothing you enter ever leaves your device.
-
3. Adjust the appearance
Set bar width (Narrow, Normal, or Wide), choose a barcode height, and pick custom colors for the bars and background. Toggle the text label on or off depending on whether you want the human-readable value shown below the bars. The preview updates instantly as you change any setting.
-
4. Download or copy
Click Download SVG for a print-ready scalable vector file that looks sharp at any size — perfect for labels, packaging, and signage. Click Download PNG for a 2× high-resolution raster image ready for digital use. Or click Copy image to place the barcode directly on your clipboard.
Why users love this tool
- Your data never leaves your device — the barcode is generated entirely in JavaScript running in your browser, not on a remote server.
- Instant live preview — the barcode updates as you type, no button to click.
- SVG and PNG download — get a print-perfect vector file or a high-resolution raster image, whichever suits your project.
- Completely free — no account, no watermark, no limits. Just open the page and generate.
Barcode format guide
Not sure which format to pick? Here is a quick reference for common use cases:
Code 128
General purpose — any text or number. Supported everywhere.
HELLO-WORLD-123 EAN-13
Global retail product labels. 12 or 13 digits.
590123412345 EAN-8
Small retail packaging. 7 or 8 digits.
9638507 UPC-A
North American retail products. 11 or 12 digits.
03600029145 Code 39
Industrial and logistics labels. A–Z, 0–9, and - . $ / + %
PART-4521-A ITF-14
Shipping cartons and outer packaging. 13 or 14 digits.
1234567890128 MSI / Plessey
Inventory management and warehouse shelving. Digits only.
1234567 Pharmacode
Pharmaceutical packaging. Integer between 3 and 131070.
1234 Codabar
Blood banks, libraries, and courier services. Starts and ends with A–D.
A1234B Frequently Asked Questions
- Is my data sent to a server?
- No. The barcode is generated locally in your browser using the open-source JsBarcode JavaScript library. Nothing you enter is transmitted to any server.
- Which format should I use for a product barcode?
- Use EAN-13 for global retail products or UPC-A for North American retail. Both require a GS1-issued company prefix to create a valid, globally unique barcode for commercial sale. For internal or prototype use, Code 128 is faster to set up.
- Can I print the barcode?
- Yes. Download the SVG version for print use — SVG is a vector format that scales to any size without losing sharpness, whether it's on a small label or a large carton.
- Is this barcode generator free?
- Yes — completely free. No account, no credit card, no watermarks, and no usage limits.
- Why does my EAN-13 barcode show 13 digits when I only entered 12?
- EAN-13 uses a check digit as its last (13th) digit. JsBarcode automatically calculates and appends the correct check digit when you provide 12 digits, producing a fully valid EAN-13 barcode.
- Why do scanners fail to read my barcode?
- The most common reasons are: insufficient contrast between bars and background (always use black on white for critical applications), bar width too narrow for the scanner's resolution, or input data that doesn't match the selected format's rules.