Barcode Generator

Generate Code 128, EAN-13, UPC, Code 39, ITF-14 barcodes from any text or number - download as PNG or SVG

Barcode Format

Bar width2px
Bar height80px

Turn a Product Number Into a Scannable Barcode

Every barcode format encodes numbers or text as a specific pattern of bars, and each one exists for a reason: EAN-13 and UPC-A are the codes printed on retail packaging worldwide (Europe and North America respectively), EAN-8 handles small packaging where a full EAN-13 wouldn't fit, ITF-14 is built for shipping cartons and warehouse logistics, and Code 128 or Code 39 are general-purpose formats used internally by businesses for inventory and asset tracking. This tool generates all six using the JsBarcode library, rendering directly to an SVG element in the browser so the barcode is a real vector graphic, not a rasterized image, from the moment it's created.

Picking a format sets the example value and validation rules for that standard: EAN-13 rejects anything that isn't 13 digits, UPC-A expects exactly 12, and so on, with an inline error message if the value you type doesn't fit. Bar width, bar height, line color, background color, and whether to print the human-readable value underneath are all adjustable, and the preview updates as you type or drag a slider. Because the barcode lives in the DOM as an SVG, downloading it as SVG produces a genuinely scalable file with crisp edges at any print size, while the PNG export rasterizes that same SVG onto a canvas for use in places that don't accept vector formats, like a Word document or an email.

How to Use

  1. 1

    Pick the barcode standard

    Choose EAN-13 or UPC-A for retail products, EAN-8 for small packaging, ITF-14 for shipping cartons, or Code 128/Code 39 for internal inventory use.

  2. 2

    Type the value to encode

    Each format has its own length and character rules. An inline error appears immediately if the value doesn't match what the selected standard requires.

  3. 3

    Adjust bar width, height, and colors

    Drag the width and height sliders and pick bar and background colors. Toggle whether the readable text prints below the bars.

  4. 4

    Download SVG or PNG

    SVG keeps the barcode as a true vector for print at any size. PNG rasterizes it for use in tools that don't accept SVG.

Key Features

  • →EAN-13 needs exactly 13 digits including the check digit; get the check digit wrong and most scanners will refuse to read it.
  • →For barcodes going to a commercial printer, download SVG so the bars stay perfectly crisp regardless of the final print size.
  • →Thin bars (1-1.5px) can blur together when printed small. For labels under an inch wide, use a bar width of 2px or more.
  • →ITF-14 is meant for outer shipping cartons, not the individual retail unit inside, don't substitute it for EAN-13 on packaging.
  • →Code 128 is the best default when you're not bound by a retail standard, since it encodes full ASCII text, not just digits.

Frequently Asked Questions

Which barcode format should I use for a retail product?

EAN-13 is the standard for retail products sold in Europe and most of the world; UPC-A is the equivalent standard used in the US and Canada. EAN-8 is a compressed version for packaging too small for a full EAN-13.

Why does the generator say my value is invalid?

Each format enforces its own rules; EAN-13 needs exactly 13 digits, UPC-A needs 12, and so on. The tool validates as you type and shows an error describing what the selected format expects.

Should I download the SVG or the PNG version?

SVG is a vector file, so it stays perfectly sharp no matter how large you print it, which matters for professional packaging. PNG is a fixed-resolution raster image, fine for screens or documents that don't accept SVG.

Can this generate a barcode for shipping cartons?

Yes, select ITF-14, which is the format used on outer shipping cases and pallets in logistics, distinct from the EAN-13 or UPC-A used on the individual retail item.

Is there a limit on how many barcodes I can create?

No. Every barcode is generated locally in your browser using JsBarcode, so there's no server involved, no account, and no cap on how many you generate or download.

Last updated: June 2026

Related Tools