Barcode Generator

Generate free barcodes online in 2026 with yhstky's barcode generator. Create EAN-13, UPC, and Code 128 barcodes and download the PNG instantly — no sign-up.

  • ✓ Free forever
  • ✓ No sign-up
  • ✓ Private — runs in your browser

Loading tool…

About this barcode generator

Barcode Generator

A barcode generator turns product numbers and text into scannable linear barcodes — the striped symbols on retail packaging, shipping labels, and inventory tags. Enter your data, pick the symbology, and the tool draws a print-ready barcode you can download as a PNG.

How to use it

  1. Choose the Symbology: EAN-13, UPC-A, Code 128, Code 39, or ITF-14.
  2. Enter your data in the Value field — the tool validates length and character set for the format.
  3. Adjust the Width and Height for your label or print size.
  4. Preview the barcode, then click Download PNG to save it.

The method behind it

Each symbology is defined by an ISO standard that specifies how characters become bar patterns. EAN-13 and UPC-A (ISO/IEC 15420) encode digits in fixed-width bar groups and end with a check digit computed from the other digits, which lets scanners detect misreads. Code 128 (ISO/IEC 15417) encodes the full ASCII set using three character subsets plus a modulo-103 check character, making it the densest choice for mixed letters and numbers. Code 39 handles 43 characters (A–Z, 0–9, and a few symbols) with no check digit required, and ITF-14 encodes 14 digits in interleaved pairs for corrugated shipping cases. The EAN-13 check digit is computed like this: number the first 12 digits 1–12 from the left, add the digits in odd positions, add three times the digits in even positions, and take the check digit as `(10 − (total mod 10)) mod 10`. The first 2–3 digits are the GS1 prefix, which identifies the country where the number was registered (for example, 590 = Poland) — not where the product was manufactured.

Frequently asked questions

Which barcode format should I choose?

For products sold at retail: EAN-13 (most of the world) or UPC-A (US/Canada) — and you need a GS1-licensed number. For shipping labels and serial numbers with letters: Code 128, the most compact alphanumeric option. For simple internal asset tags: Code 39. For outer cartons: ITF-14. When in doubt, ask whoever will scan it; scanners read all of these, but industry systems expect specific ones.

Can I use a generated barcode on a product I sell?

The symbol will be technically correct, but retail barcodes must come from a number range licensed to you by GS1 — printing a made-up EAN on packaging can collide with someone else's product and get your listing rejected by retailers. For warehouse bins, library books, tickets, and internal tracking, generated numbers are perfectly fine.

Why won't my barcode scan?

The usual causes: printed too small (stay at 80–100% of nominal size), low contrast (black on white works best — never red on white, which red lasers cannot see), a damaged or wrinkled label, or quiet zones (the blank margins on both sides) trimmed off. Reprint larger, on matte stock, with the margins intact.

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

A linear barcode like EAN-13 holds a short string — typically a product number — and needs a database behind it to mean anything. A QR code holds far more data (URLs, text, contact cards) and is read by phone cameras rather than laser scanners. Use barcodes for inventory and retail, QR codes when a human with a phone needs the actual content.

Do barcodes expire?

The symbol itself never expires — it is just an encoding of your data. What changes is the meaning behind the number: a retail GTIN stays valid as long as the product exists, while an internal asset code is valid as long as your system recognizes it. If you reprint a label years later from the same value, it scans exactly as before.

Worked example

Input: the 12 digits 590123412345, symbology EAN-13.

Step 1 — split into odd and even positions (counting from the left, starting at 1):

  • Odd positions (1,3,5,7,9,11): 5, 0, 2, 4, 2, 4 → sum = 17
  • Even positions (2,4,6,8,10,12): 9, 1, 3, 1, 3, 5 → sum = 22

Step 2 — total = 17 + (3 × 22) = 17 + 66 = 83.

Step 3 — check digit = (10 − (83 mod 10)) mod 10 = (10 − 3) = 7.

The complete barcode value is 5901234123457. The tool computes this automatically: enter the 12 digits and it appends the 7, then renders the symbol. The leading 590 is the GS1 prefix for Poland, meaning the number block was registered there. Print the PNG at 100% scale — at least 80% of nominal size — and any retail scanner will read it.

Related tools