Skip to content
RightYantra
Text & developer

Barcode Generator

Generate a scannable barcode in six common symbologies, with the check digit calculated or verified for you. Adjust the bar width and height, keep or drop the printed numbers, and download a PNG or a sharp SVG for print. Everything is drawn in your browser — no watermark, no account, no upload.

How to use it· 4 steps
  1. Choose the barcode type. The hint under it says what each one is used for and what it can encode.
  2. Type the data. For EAN, UPC and ITF-14 you can leave off the check digit and it is added, or include it and it is checked.
  3. Set the bar width and height, and choose whether to show the human-readable text and the quiet zones.
  4. Download the PNG for screens and labels, or the SVG for print, and test-scan it before printing a batch.
Barcode GeneratorRuns on your device

Step by step

How to use the barcode generator

  1. 1Choose the barcode type. The hint under it says what each one is used for and what it can encode.
  2. 2Type the data. For EAN, UPC and ITF-14 you can leave off the check digit and it is added, or include it and it is checked.
  3. 3Set the bar width and height, and choose whether to show the human-readable text and the quiet zones.
  4. 4Download the PNG for screens and labels, or the SVG for print, and test-scan it before printing a batch.

Which barcode type do you need?

For products sold in shops, the barcode is set by the retail system. EAN-13 is the international standard, 13 digits, used on products across Europe, Asia, Africa and most of the world. UPC-A, 12 digits, is its North American counterpart; checkout scanners worldwide read both, and a UPC-A is in fact an EAN-13 whose first digit is 0. EAN-8 is the short form for packs too small for a full EAN-13.

ITF-14 goes on the outer cartons and cases that products travel in. It encodes a 14-digit GTIN and is designed to survive being printed on corrugated cardboard, which is why it is chunky and framed by bearer bars.

For anything that is not a retail product — shipping labels, asset tags, inventory bins, tickets, document IDs — Code 128 is the usual choice. It encodes all 128 ASCII characters, letters in both cases, digits and punctuation, and it is compact. Code 39 is older and much wider for the same data, and only has capital letters, digits and a few symbols, but it is still required by some industrial, automotive and government systems and is readable by almost any scanner ever made.

Real product barcodes come from GS1

This generator will draw any valid number as an EAN or UPC barcode, but that does not make the number yours. Retail barcode numbers are allocated by GS1, the not-for-profit standards body, through its national offices: a company licenses a company prefix and numbers its products within it. That is what guarantees no two products in the world share a number.

A made-up EAN or UPC will scan, but it may belong to someone else's product in a retailer's database, and Amazon and many large retailers check the numbers sellers submit against GS1's records. Numbers sold cheaply by resellers often turn out to be registered to another company. For internal use — your own stock system, a library, a test — any number is fine; for products sold through retailers, get your numbers from GS1.

Check digits, and why a wrong one matters

The last digit of an EAN-13, EAN-8, UPC-A or ITF-14 is a check digit computed from the others, so a scanner can tell when a digit was misread. The rule is the same for all four: starting from the rightmost data digit, multiply the digits alternately by 3 and 1, add them up, and the check digit is whatever brings the total to the next multiple of 10.

For 400638133393, the weighted sum is 89, so the check digit is 1 and the full number is 4006381333931. Type 12 digits and the generator adds it; type all 13 and it is verified, and a wrong one is reported with the digit it should be — a mismatch almost always means a typing mistake somewhere else in the number.

Code 128 always carries a mod-103 checksum symbol, which is computed and included automatically; it is part of the bars, not the printed text. Code 39's mod-43 check character is optional and off by default, because some systems expect it and others will read it as part of the data — turn it on only if your system asks for it.

Printing a barcode that scans

The narrowest bar is called a module, or the X-dimension, and its printed width is what decides whether a scanner can read the code. For EAN-13 and UPC-A the nominal module is 0.33 mm, and GS1 allows 80% to 200% of that. At 300 dpi, a common label-printer resolution, 0.33 mm is almost exactly 4 pixels, so a module width of 4 here prints at full size; the generator shows the printed size at 300 dpi under every barcode.

Keep the quiet zones — the blank margins either side. A scanner finds a barcode by looking for the empty space before the first bar, and printing text or a border into it is one of the most common reasons a code will not scan. Print black bars on a white or very light background; red bars are invisible to the red light most scanners use. Do not squash the height to fit, and do not stretch a PNG by a fraction, which turns crisp bars into blurred ones. The SVG scales cleanly to any size, so it is the better file to send to a printer.

How Code 128 keeps the code short

Code 128 has three character sets. Set A has capitals, digits, punctuation and control characters; set B has capitals, lower case, digits and punctuation; set C encodes pairs of digits, 00 to 99, as a single symbol. The generator switches between them as it goes: a run of four or more digits at the start or end, or six or more in the middle, is packed into set C at half the width, and a lone character from the other of A and B uses a one-character shift rather than two full switches.

This is the switching method recommended in the specification, and it produces a near-minimal barcode for real-world data. A long number such as 1234567890 comes out as five symbols instead of ten.

What this generator does not do

It does not make GS1-128 barcodes with application identifiers, EAN and UPC add-on codes for magazines and books, UPC-E short codes, or full-ASCII Code 39. It also does not make two-dimensional codes such as QR, Data Matrix or PDF417 — for a QR code, use the QR code generator.

Answers

Frequently asked questions

Is this barcode generator free to use commercially?

Yes. There is no watermark, no sign-up and no limit, and the barcodes are yours. Retail EAN and UPC numbers themselves, however, must be licensed from GS1 if the products are sold through shops.

Which barcode should I use for my product?

For retail products, EAN-13 worldwide or UPC-A in the US and Canada, using a number licensed from GS1. For shipping, inventory or internal labels, Code 128.

Do I need to type the check digit?

No. Type 12 digits for EAN-13, 11 for UPC-A, 7 for EAN-8 or 13 for ITF-14 and the check digit is calculated. If you include it, it is verified and a wrong one is flagged.

PNG or SVG — which should I download?

SVG for print and anything that may be resized, because it stays perfectly sharp. PNG for documents, spreadsheets and web pages, at the exact pixel size shown.

Why will my barcode not scan?

The usual causes are bars printed too small, missing quiet zones, low contrast or colour bars, and a PNG resized by a fraction. Increase the bar width, keep the margins clear and print black on white.

Can I encode lower-case letters or accents?

Code 128 encodes lower case and all ASCII punctuation, but not accented letters or symbols like ₹ and €. Code 39 has capitals only, so lower-case input is converted to capitals.