ToolJutsu
All tools
QR & Barcode Tools

Barcode Generator

Generate barcodes in multiple common formats.

Any ASCII text or digits — letters, numbers and symbols are all allowed.

2 px
100 px
Enter a value above to generate a barcode preview.
Processed on your device. We never see your files.

How to use Barcode Generator

What this tool does

A barcode generator turns a number or short piece of text — a product code, a warehouse SKU, a carton ID — into a 1D barcode: the familiar pattern of black bars and white spaces that a laser or camera scanner reads in an instant. ToolJutsu’s generator supports nine widely used symbologies: Code 128, Code 39, EAN-13, EAN-8, UPC-A, ITF-14, MSI Plessey, Pharmacode, and Codabar. It renders a live preview as you type, checks your value against the rules of the chosen format, and lets you download the result as a PNG or SVG. Everything is computed in your browser, so nothing you encode is ever uploaded.

The point of a barcode is speed and accuracy. A cashier scanning a product, a picker confirming a shelf location, or a courier logging a parcel all replace slow, error-prone manual typing with a single beep. The barcode itself is just a visual encoding of the value underneath it — the meaning lives in your own system.

Why you might need it

Barcodes are everywhere a physical item needs a digital identity. A small shop labels its own-brand stock so it scans at the till. A warehouse prints asset tags for laptops, tools, and equipment. A maker selling on a marketplace needs UPC or EAN codes on packaging. A logistics team marks shipping cartons with ITF-14 so cases scan reliably even on rough cardboard. A library or archive tags every item with a Codabar label for check-in and check-out.

You might need this tool to reprint a damaged label, to test that a code scans before committing to a print run, to add barcodes to a packing slip or inventory spreadsheet, or to prototype a labelling scheme before buying dedicated software. Because the preview is instant and the formats are validated, you see immediately whether a value will actually encode — no wasted label stock.

How to use it

  1. Choose a barcode format from the dropdown — Code 128, EAN-13, UPC-A, ITF-14, and the rest are all listed with friendly names.
  2. Type your value into the field. The hint below it tells you exactly what that format accepts — how many digits, which characters, and so on.
  3. Watch the live preview update as you type. If the value breaks the format’s rules, a clear message explains what is expected instead.
  4. Adjust the bar width and bar height sliders, set the bar colour, and toggle show value text to print the human-readable number underneath.
  5. When the barcode looks right, click Download PNG for a raster image or Download SVG for a scalable vector file ready for label printing.

Understanding the formats

Each symbology exists for a reason. Code 128 is the densest general-purpose format and accepts any text, which makes it the default choice for internal inventory, asset, and shipping labels. Code 39 is older and bulkier but is supported by almost every scanner, so it is useful for legacy environments. EAN-13 and EAN-8 are the retail standard outside North America, while UPC-A is the equivalent used in the US and Canada — all three are numeric and carry a built-in check digit. ITF-14 encodes the 14-digit shipping-container code printed on outer cases and cartons. MSI Plessey is a numeric format long used for warehouse and grocery shelf labels. Pharmacode is a compact code read by pharmaceutical packaging lines, encoding a single number from 3 to 131070. Codabar predates the others and is still common in libraries, blood banks, and photo-processing labs because it is simple and self-checking.

If you are not tied to an existing system, Code 128 is almost always the right starting point: it is compact, supports letters and numbers, and is read by modern scanners without any special configuration.

Common pitfalls

The most frequent problem is choosing a format whose rules your value does not meet. Retail formats are strict — EAN-13 will not accept letters, and a 10-digit number is simply not a valid UPC-A. This tool catches that for you and explains the requirement, but it is worth knowing the constraints before you design labels around a code.

The second pitfall is print quality. A barcode needs sharp, high-contrast bars and a clear “quiet zone” — the empty margin on each side — to scan reliably. Keep the bar colour dark against a white background, avoid scaling a low-resolution PNG up to label size, and prefer the SVG download for anything printed. Always test the finished label with the actual scanner before producing it in bulk.

Frequently asked questions

Is the data I put into a barcode sent anywhere?
No. The barcode is drawn directly in your browser using JavaScript — the product codes, SKUs, or serial numbers you type never reach a server. You can confirm this in your browser's Network tab; nothing is uploaded, logged, or stored, so it is safe to encode internal inventory data.
Which barcode format should I choose?
It depends on what the barcode is for. Use EAN-13 or UPC-A for retail products that scan at a till, Code 128 for general inventory and asset labels because it packs the most data into the least space, ITF-14 for shipping cartons and cases, MSI for warehouse shelf labels, and Codabar for libraries, blood banks, and photo labs. Code 39 is a good all-round choice when a scanner only supports older symbologies.
Why does my barcode show an error instead of rendering?
Each format has strict rules about what it can encode. EAN-13 needs 12 or 13 digits, UPC-A needs 11 or 12, EAN-8 needs 7 or 8, and Pharmacode only accepts a number between 3 and 131070. If your value breaks the rules — wrong length, letters in a numeric-only format, an invalid checksum — the tool shows a message explaining exactly what that format expects rather than drawing a barcode that no scanner could read.
Should I download a PNG or an SVG?
Use PNG for screens, spreadsheets, and quick sharing — it is a fixed-resolution image. Use SVG for print and label sheets, because it is vector-based and stays perfectly crisp at any size. Sharp, high-contrast bars are essential for reliable scanning, so SVG is the safer choice whenever the barcode will be printed.
Do I need to add the checksum digit myself?
No. For EAN-13, EAN-8, and UPC-A you can enter the value without the final check digit and the tool calculates it automatically. If you already have the full code including the checksum, enter it as-is and it will be used directly.

Related tools