OCR & QR Codes

Free Barcode Generator

Create barcodes online for free. Generate CODE128, EAN-13, and UPC barcodes from any number or text and download them as PNG images. Browser-based, no uploads, no signup.

Loading tool…

How to use Barcode Generator

  1. 1Choose a barcode type such as CODE128, EAN-13, or UPC.
  2. 2Enter the number or text you want to encode.
  3. 3The barcode renders instantly in your browser as a clean image.
  4. 4Download the finished barcode as a high-quality PNG.

Features

  • Supports common 1D formats: CODE128, EAN-13, and UPC
  • Built with JsBarcode and runs entirely in your browser
  • Crisp, print-ready PNG output for labels and packaging
  • Free, no signup, unlimited use, and works on mobile

What is a 1D barcode and which format should you use?

A barcode is a machine-readable way to represent data as a pattern of parallel lines and spaces of varying widths. The barcodes this tool creates are one-dimensional (1D), meaning the information is encoded along a single horizontal axis in the thickness and spacing of vertical bars. A scanner sweeps across the pattern and translates those widths back into the original number or text. This is the familiar barcode you see on retail products, shipping labels, and inventory tags. It differs from a QR code, which is a two-dimensional (2D) code storing data both horizontally and vertically, allowing a QR code to hold far more information in a compact square while a 1D barcode holds a shorter string in a wider strip.

This generator is built on JsBarcode, a well-established JavaScript library, and renders the barcode directly in your browser. It supports the most widely used 1D formats. CODE128 is a high-density, general-purpose format that can encode letters, numbers, and symbols, making it ideal for internal inventory, asset tags, and shipping references where you need flexibility. EAN-13 is the 13-digit standard used on retail products worldwide, the barcode you scan at almost any supermarket checkout. UPC (specifically UPC-A) is the 12-digit format used primarily in North American retail. Choosing the right format depends on where the barcode will be used and what system will scan it.

Each format has its own rules about what data is valid. EAN-13 and UPC accept only digits and expect a specific length, and they include a check digit — a final calculated number that lets a scanner verify the code was read correctly. CODE128 is far more permissive and accepts alphanumeric text. If you enter data that does not match the selected format's requirements, the barcode will not render, which is a helpful signal that the input needs adjusting.

Printing and using your barcodes

The barcode you create downloads as a PNG, a lossless image format that keeps the bars sharp and evenly spaced. Crisp edges matter a great deal for barcodes: if the bars blur together or the widths shift during printing, a scanner may misread or fail to read the code entirely. A PNG scales cleanly into label templates, product packaging, and design software without introducing the compression artifacts that a JPG would, so it is the right choice for anything you intend to print and scan.

When you print, preserve the quiet zones — the blank margins on the left and right of the barcode — because scanners use them to detect where the pattern begins and ends. Keep the barcode large enough for your scanner and scanning distance, avoid stretching it in a way that distorts the bar widths, and print with good contrast, ideally dark bars on a plain white background. Testing the printed result with your actual scanner before producing a large batch is always worthwhile.

Because everything runs locally in your browser, the numbers and text you encode are never uploaded to a server, and there is no signup, watermark, or usage limit. That makes this practical for small businesses labeling stock, makers packaging a product, or anyone who needs to generate a valid retail or inventory barcode quickly. If you need to encode a longer message, a link, or Wi-Fi details instead of a short product number, a QR code is the better fit — use the Pixohub QR Code Generator for that, and this barcode tool for standard 1D retail and inventory codes.

Frequently asked questions

Is this barcode generator free?

Yes. You can create and download as many barcodes as you like for free, with no account, no watermark, and no limits.

Is my data uploaded anywhere?

No. Barcodes are generated entirely in your browser with JsBarcode, so the numbers or text you encode never leave your device.

Which barcode formats are supported?

Common 1D formats including CODE128 (general-purpose, alphanumeric), EAN-13 (the 13-digit worldwide retail standard), and UPC (the 12-digit format used mainly in North American retail).

Why won't my barcode render?

Each format has rules about valid characters and length. EAN-13 and UPC accept only digits of a specific length and use a check digit, while CODE128 accepts letters and numbers. If the input does not match the selected format, the barcode will not generate.

What is the difference between a barcode and a QR code?

A standard barcode is 1D, encoding a short string in the widths of vertical lines, while a QR code is 2D and stores much more data in a square grid. Use a barcode for retail and inventory numbers and a QR code for links or longer text.

In what format do I get the barcode?

The barcode downloads as a PNG, a lossless image that keeps the bars crisp and evenly spaced so scanners can read it reliably when printed.

Does it work on mobile?

Yes. The generator is fully responsive and works in any modern mobile browser, so you can create and download a barcode straight from your phone.

Related tools