Barcode Generator

Generate CODE128, EAN-13, UPC, CODE39 and other barcode formats — download as PNG or SVG.

Barcode Generator
2
100 px

📐 How to Use

  1. Type or paste the text or number you want to encode.
  2. Choose a barcode format — CODE128 works for any text, while EAN-13/EAN-8/UPC-A expect a specific number of digits.
  3. Adjust bar width, height, and colors as needed, and toggle whether to show the human-readable text below the bars.
  4. Download the finished barcode as a PNG or SVG file.

🎯 When to Use This

  • Labeling shelves, tools or archive boxes with CODE128, so an inventory app reads an internal reference instead of someone typing it in.
  • Rendering artwork for a product that already holds a GS1-issued EAN-13 number, where you need correct bars rather than a newly invented code.
  • Printing ITF-14 case marks for an outer carton and downloading SVG, so prepress can scale the symbol without softening the bar edges.
  • Adding a scannable job or ticket number to a printed work order, letting a warehouse scanner pull up the record in a single pass.

❓ Frequently Asked Questions

QWhich barcode format should I use?
Use CODE128 for general-purpose text or numbers of any length. Use EAN-13, EAN-8, or UPC-A only if you have an actual product barcode number issued for retail (these have strict digit-count and check-digit rules). CODE39 is common in logistics and inventory systems.
QWhy does it say my value is invalid for the selected format?
Formats like EAN-13, EAN-8, and UPC-A require an exact number of digits (e.g. EAN-13 needs 12-13 digits). If your value doesn't match, switch to CODE128, which accepts any text or number.
QIs my data uploaded anywhere?
No. The barcode is generated entirely in your browser using JavaScript. Nothing is sent to or stored on any server.
QCan I use the generated barcode commercially?
Yes, the generated image is yours to use. Note that formats like EAN-13/UPC-A used for real retail products require registering the number with the relevant issuing organization (e.g. GS1) — this tool only renders the barcode graphic, it doesn't register or validate ownership of the number.
QPNG or SVG — which should I download?
Download SVG if you need to resize the barcode without losing quality (e.g. for print or design software). Download PNG for quick use in documents, spreadsheets, or web pages.

ℹ️ About This Tool

A linear barcode stores characters as bars and spaces of varying width, read by sweeping a beam across the symbol. The formats differ in what they carry. CODE128 encodes the full ASCII set at high density and is the general-purpose choice. EAN-13, EAN-8 and UPC-A are retail product codes with a fixed digit count and a check digit derived from the rest. CODE39 suits older inventory hardware, ITF-14 marks shipping cases, and Pharmacode encodes a small integer on medicine packaging.

Choose one of eight formats, enter a value, and JsBarcode renders an inline SVG in the page, calculating check digits where the format defines them. A value that breaks the rules clears the symbol and shows an error. Bar width spans 1 to 4, height 40 to 220 pixels, both colors are adjustable, and the text line can be hidden. SVG downloads directly; PNG is rasterized from it.

⚠️ Notes & Limits

  • These are one-dimensional formats carrying a short value. For a URL, a contact card or anything longer than an identifier, use a QR code instead.
  • PNG export rasterizes the SVG at its on-screen pixel size, so a barcode downloaded at 100 pixels high will print soft. Download SVG for anything going to press.
  • The color pickers permit combinations scanners cannot read. Keep dark bars on a light background, and avoid red bars, which are invisible to red-laser scanners.
  • One symbol at a time, with the margin fixed at 10 pixels. There is no batch generation from a list and no control over the quiet zone some print specifications demand.