Free Barcode Generator

Create CODE128, EAN-13 and UPC barcodes online for free from any number or text, and download them as PNG images. In your browser, no upload.

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.

How to use Barcode Generator, step by step

  • Choose a Format: CODE128 (default), EAN-13, UPC-A, CODE39 or ITF-14. Retail products use EAN-13 or UPC-A; internal labels usually use CODE128.
  • Type the number or text into Value. The hint under the box says what the format accepts; for EAN-13 enter 12 digits and the 13th check digit is added for you.
  • If an error appears and the preview says No preview, the value does not fit the format. A wrong check digit on a full 13-digit EAN is reported as invalid.
  • Untick Show value text to drop the human-readable number under the bars.
  • Keep Line color dark and Background light; scanners need strong contrast, and red bars are hard for many laser scanners to see.
  • Press Download PNG, then test the printed label with the scanner you will actually use.

Real example: CODE128, EAN-13 and UPC-A

The default CODE128 barcode for PIXOHUB-123 downloaded as a 332 × 142 PNG of 4.6 KB. For EAN-13 we entered the 12 digits 400638133393; the tool added check digit 1 and produced a 234 × 142 PNG of 3.9 KB. Typing the full 4006381333931 was accepted, while 4006381333932, with a wrong check digit, was rejected. A UPC-A code for 03600029145 came out at 242 × 142.

These images use 2 pixels per bar module. Printed at 300 dpi, the 234-pixel EAN-13 is about 20 mm wide, roughly half the 37.29 mm nominal size, so scale it up in whole-number steps for print.

FormatValuePNG
CODE128 (default)PIXOHUB-123332 × 142, 4.6 KB
EAN-13400638133393 → check digit 1234 × 142, 3.9 KB
UPC-A03600029145242 × 142, 4.1 KB

Last updated

Barcode Generator compared with other ways to do it

Label printer software

Software that comes with label printers lays barcodes out on the exact label size and prints at the printer's native resolution, which avoids scaling problems. For regular stock labelling, that is the better setup. This tool is for the occasional barcode you need as an image, for a document, a mock-up or a one-off label.

Inkscape and Word

Inkscape can render barcodes as vector shapes, and Word's DISPLAYBARCODE field can place one in a document. Vectors stay sharp at any size, which suits packaging artwork. A PNG from this tool is a fixed-size image, so scale it by whole numbers (2×, 3×) to keep the bar widths exact.

Getting a real retail number

No generator, online or desktop, gives you a valid product number for selling in shops. EAN and UPC numbers are issued through GS1; the generator only draws the bars for a number you already have. For internal use, CODE128 with your own codes is fine.

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

Should I type the check digit for EAN-13 and UPC-A?

You can leave it off: enter 12 digits for EAN-13 or 11 for UPC-A and the tool adds it. If you type the full number, the check digit must be correct; in our test a wrong last digit was rejected.

How big should I print the barcode?

For EAN-13, the nominal width is 37.29 mm. The PNG here is about 234 pixels wide, so at 300 dpi it prints at about 20 mm. Enlarge it by an exact factor such as 2× without smoothing, then check it scans.

What is ITF-14 for?

ITF-14 marks outer cartons and cases rather than single products. Enter 13 digits and the 14th check digit is added. It is printed large on corrugated boxes, often with a thick border bar around it.

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.

More text, code & dev tools