Barcode Generator
Turn any text or product number into a scannable barcode. Choose a format like CODE128, EAN-13, or UPC, adjust the bar width and height, then download a crisp PNG or vector SVG — all generated privately in your browser.
Any text or numbers
Barcodes are generated entirely in your browser — the value you enter is never sent to any server.
Understanding the Barcode Generator
The Barcode Generator turns any text or product number into a scannable, print-ready barcode entirely in your browser. Choose from six widely used symbologies — CODE128, EAN-13, EAN-8, UPC-A, CODE39, and ITF-14 — and fine-tune the appearance with adjustable bar width, height, and an optional human-readable caption beneath the bars. The barcode updates live as you type, and if a value doesn't fit the chosen format's rules, you get a clear hint instead of a broken image. When you're happy with it, download a pixel-perfect PNG or a scalable SVG vector. Nothing is ever uploaded — the value you enter stays on your device.
How it works
Pick a barcode format and type your value. The tool uses the JsBarcode engine to encode that value into a pattern of bars and spaces following the chosen standard, drawing the result directly into an SVG element that re-renders on every change. Each format enforces its own rules: numeric-only formats validate length and compute the required check digit automatically. If the value is invalid, the engine reports it and the tool shows a friendly message rather than rendering a faulty code. Download PNG redraws the barcode onto a canvas and exports a raster image, while Download SVG serializes the on-screen vector so it stays sharp at any print size.
Worked example
Suppose you sell a retail product and have the 12-digit number 036000291452. Select UPC-A, paste the number, and the generator draws the barcode and calculates the final check digit for you. Set the height to 100px and bar width to 2 for a crisp label, leave "show text" on so the digits print beneath the bars, then click Download SVG for a vector you can scale onto packaging without blurring. Switch the format to CODE128 and type "SKU-001" to instead encode a free-form internal stock code.
Tips & common mistakes
- Use CODE128 when you just need to encode arbitrary text or alphanumeric SKUs — it's the most flexible and compact general-purpose format.
- Match the digit count to the format: EAN-13 needs 12–13 digits, EAN-8 needs 7–8, UPC-A needs 11–12, and ITF-14 needs 13–14. Enter one fewer than the maximum and the check digit is added automatically.
- Download SVG for anything you'll print large — labels, packaging, or signage — because vectors stay perfectly sharp at any size, unlike PNG.
- Keep "show text" enabled so the human-readable number prints under the bars, which helps cashiers and warehouse staff when a scan fails.
- Leave a quiet zone (margin) around the barcode and avoid stretching it too thin — scanners need adequate bar width and white space on both sides to read reliably.
- CODE39 only accepts uppercase letters, digits, and a few symbols (- . space $ / + %); use CODE128 instead if you need lowercase or a wider character set.
Related tools
How to Use This Generator
- 1Type your value or product number into the box.
- 2Pick a format and adjust the bar width and height.
- 3Download as PNG or SVG and print or share it anywhere.
Frequently Asked Questions
Which barcode formats are supported?
You can generate CODE128 (the default, which encodes any text or numbers), EAN-13, EAN-8, UPC-A, CODE39, and ITF-14. CODE128 is the most flexible choice for general-purpose labels, while EAN and UPC are the retail product standards.
Why is my barcode invalid?
Some formats require a specific length or character set. EAN-13 needs 12 or 13 digits, EAN-8 needs 7 or 8, UPC-A needs 11 or 12, and ITF-14 needs 13 or 14 digits. If your value does not match, the tool shows a friendly hint instead of a broken barcode.
Can I download the barcode?
Yes. You can download your barcode as a PNG image or as a scalable SVG vector. SVG stays crisp at any size, which is ideal for printing on labels, packaging, and signage.