Barcode Generator

Create CODE128, EAN-13, UPC-A, EAN-8, ITF-14 and CODE39 barcodes in your browser, with automatic check digits. Download a high-resolution PNG or a vector SVG.

Six common formats

CODE128, EAN-13, UPC-A, EAN-8, ITF-14 and CODE39, with check digits calculated and verified for you.

Print-ready downloads

PNG at four times screen resolution, or SVG vector files that stay sharp at any size.

Private and unlimited

Barcodes are drawn on your device. Nothing is uploaded, and no account is needed.

How to Make a Barcode

  1. Type the text or number you want to encode.
  2. Choose a barcode format. If you are not sure, CODE128 works for most internal uses.
  3. Click Generate Barcode or press Enter. If the value does not fit the format, a message explains exactly what to change.
  4. Click Download PNG for an image you can insert into documents and label software, or Download SVG for a vector file for professional printing.
Screenshot of the Preslo Barcode Generator tool, free and running in a web browser
Barcode Generator on Preslo (Business) — free, private and no sign-up needed.

Which Barcode Format Should You Use?

  • CODE128 encodes letters, digits and common symbols (standard ASCII). It is compact and is the usual choice for inventory labels, asset tags, shipping references and internal systems.
  • EAN-13 is the retail product barcode used in most of the world. It has 12 data digits plus a check digit.
  • UPC-A is the retail product barcode common in the United States and Canada. It has 11 data digits plus a check digit.
  • EAN-8 is a short retail barcode for very small packages, with 7 data digits plus a check digit.
  • ITF-14 is used on outer cartons and cases in logistics. It has 13 data digits plus a check digit.
  • CODE39 is an older format still found on industrial, automotive and ID labels. It supports capital letters, digits, spaces and the symbols - . $ / + %. Lowercase letters are converted to capitals automatically.

How Check Digits Work

EAN-13, UPC-A, EAN-8 and ITF-14 end with a check digit: a number calculated from the other digits so that a scanner can detect misreads. The calculation multiplies the digits alternately by 3 and 1, adds them up and picks the digit that brings the total to the next multiple of ten.

You do not have to work this out yourself. Enter only the data digits (for example, 12 digits for EAN-13) and the tool adds the correct check digit. If you enter the full number including a check digit, the tool verifies it. When the last digit is wrong, you get a clear message that shows what the correct digit should be, instead of a barcode that would fail at the checkout.

A Note on Retail Barcodes

This tool draws a barcode for any number you type, but it does not issue or register product numbers. Products sold through shops and online marketplaces normally need a company prefix and numbers licensed from GS1, the organization that manages retail barcodes in your country. Use EAN and UPC formats for retail only with numbers you are entitled to use. For internal stock, CODE128 with your own reference numbers is usually the simpler option.

Download Quality

The PNG download is rendered at four times the on-screen size with crisp bar edges, which is enough for sharp printing on labels and in documents. The SVG download is a vector file: it can be scaled to any size without blurring, which makes it the best choice for packaging artwork and print shops. Both files have a white background and keep the quiet zone (the blank margin on each side) that scanners need.

Tips for Barcodes That Scan

  • Print black bars on a white background. Colored or patterned backgrounds reduce contrast and cause misreads.
  • Do not squash the barcode. Resize it proportionally, and never stretch it only horizontally or vertically.
  • Keep the margins clear. Leave blank space on the left and right of the bars.
  • Avoid very small sizes. Long CODE128 values produce wide barcodes; if the printed bars become too thin, shorten the value.
  • Test with a real scanner or a scanning app before you print a large batch.

Private by design

The barcode is generated by a self-hosted open-source library running in your browser tab. The values you type are not sent to Preslo or to any other server, and you can create as many barcodes as you need without an account.

Frequently asked questions

Which barcode formats are supported?

CODE128, EAN-13, UPC-A, EAN-8, ITF-14 and CODE39.

Which format is best for general use?

CODE128. It accepts letters, digits and common symbols, produces compact barcodes and is supported by virtually every scanner.

Why does it say my EAN-13 or UPC check digit is wrong?

The last digit of these barcodes must match a value calculated from the other digits. The error message shows the correct digit. You can also enter only the first 12 digits (EAN-13) or 11 digits (UPC-A) and the check digit is added automatically.

Can I use EAN-13 or UPC-A for products I sell?

Only with numbers you are licensed to use. Retail stores and marketplaces usually require numbers issued by GS1. This tool draws the barcode but cannot register a number for you.

Should I download PNG or SVG?

PNG works in almost any program and is rendered at high resolution. SVG is a vector file that stays sharp at any size, so it is better for packaging artwork and professional printing.

Why can't I use accented letters in CODE128?

CODE128 is designed for standard ASCII characters. Accented letters, emoji and other scripts are not supported reliably by scanners, so the tool asks you to remove them. For such text, a QR code is a better choice.

Is the barcode generator free?

Yes. It is free, unlimited and needs no account. The site is supported by ads.

Related tools