Skip to content

Image Tools

Barcode Generator

Create a scannable barcode for a product, inventory item, or any code you need to encode visually.

  • Free
  • No sign-up
  • Runs in your browser

Guide

What a barcode encodes and why formats differ

A linear barcode turns a short string of characters into a pattern of bars and spaces that a scanner reads with a beam of light. Different formats exist because different industries needed different rules about which characters are allowed, how long the value can be, and whether a check digit is included.

CODE128 is a general-purpose format that can hold letters, digits and many symbols, which makes it a common choice for inventory and shipping labels. CODE39 is an older format limited mainly to capital letters, digits and a few symbols. EAN13, EAN8 and UPC are retail product formats built from digits only, with a fixed length. ITF14 is used for cartons and is also numeric. MSI and pharmacode are narrower formats found in warehousing and pharmaceutical packaging.

Picking the right format is mostly about matching whatever system will scan it.

When you would generate one yourself

Common cases include labeling shelves or storage boxes, putting an asset tag on equipment, creating a code for a ticket or membership number, and mocking up packaging or a presentation slide that needs a realistic barcode.

Some of the retail formats are tied to registered numbering systems. A barcode that looks like a product code is not the same as a registered product number, and this tool does not issue or check them. For real products sold in shops, numbers come from the organization that assigns them. For internal use, CODE128 is the flexible choice.

If you need a square code that holds a link instead, use the QR Code Generator. To read an existing code from a photo, the Barcode Reader does that.

How to generate a barcode

  1. Type or paste your text into the Value field. It starts with a sample number so you can see the result immediately.
  2. Choose a Format from the menu: CODE128, CODE39, EAN13, EAN8, UPC, ITF14, MSI or pharmacode.
  3. The barcode redraws automatically whenever you change the value or the format. The human-readable value is printed beneath the bars.
  4. If the value does not fit the chosen format, an error message appears saying the barcode could not be generated for that value.
  5. Click Download PNG to save the image as barcode.png.

The barcode is drawn inside your browser, so the text you enter is not sent to a server.

Common mistakes and limits

Most errors come from using the wrong kind of value for a numeric format. EAN13 expects 13 digits (or 12, with the last check digit worked out for you by the underlying library), EAN8 expects 8 digits, UPC expects 12 digits, and ITF14 expects 14 digits. Letters in these formats will cause the error message. If you need letters, switch to CODE128.

Check the picture after any error. The download button saves whatever is currently on the canvas, so if the last value failed, the image may still show an earlier barcode. Always confirm that the printed value matches what you meant to encode before you download.

The tool offers a value, a format and a download. There are no controls for bar width, height, colors or margins. The PNG is generated at a fixed size, so for large print runs it is wise to test-scan a printed sample first.

Always scan the finished label with the actual scanner that will be used before printing many copies.

Frequently asked questions

Which format should I choose?

For general or internal use with letters and numbers, CODE128 is the flexible choice. The EAN, UPC and ITF14 options need digits only and a fixed length, so use them only when a system requires that format.

Can I change the size or colors?

No. The tool only lets you set the value and format. The barcode is generated as a black-on-white PNG at a fixed layout.

Are these valid product numbers?

The tool only draws the value you enter. It does not register numbers or confirm that they belong to a real product.

What is the downloaded file named?

The file is saved as barcode.png every time, so rename it if you make several.