Barcode Generator

Type a number or text, pick EAN-13, UPC-A, EAN-8, Code 128, Code 39 or ITF-14, and download a sharp PNG or SVG barcode — check digit included.

  • Free
  • No account
  • Runs in your browser
  • Nothing uploaded
Barcode GeneratorNothing uploaded

Letters, digits and symbols (plain ASCII), up to 80 characters. Code sets A, B and C are picked automatically for the shortest barcode.

Valid Code 128528 × 188 px · 176 modules incl. quiet zones
Code 128 barcode encoding AllUtil-128

AllUtil-128

The PNG is exactly 528 × 188 pixels, 3 px per bar module, so no bar is blurred; the preview above may be scaled to fit your screen, but the downloads are exact. For print, use the SVG and set the size in your layout software.

Runs entirely in your browser — your input is never uploaded, logged, or stored.Privacy policy

What is Barcode Generator?

This barcode generator turns a product number or a piece of text into a scannable linear barcode and lets you download it as a PNG or SVG. It is for small sellers labelling stock, warehouses printing shelf and carton labels, and anyone who needs a barcode image for a document or a mock-up — free, with no sign-up and no watermark.

Six symbologies are built in. EAN-13 and UPC-A are the retail barcodes on consumer products (UPC-A is the 12-digit form used in the US and Canada); EAN-8 is the short version for small packs; ITF-14 goes on outer shipping cartons; Code 128 encodes any plain-ASCII text compactly; Code 39 encodes capital letters, digits and a few symbols and is still common on industrial and ID labels. For the retail and carton types you can type the number without its last digit and the GS1 check digit is calculated for you, or type all of it and the tool tells you if the check digit is wrong — and what it should be.

The encoders are written from the published tables, not copied from a library. EAN, UPC and ITF-14 follow the GS1 General Specifications (Release 26.0): the left-half parity patterns, the guard bars that extend 5 modules below the others, and the minimum quiet zones (11 and 7 modules either side of an EAN-13, 9 for UPC-A, 7 for EAN-8, 10 for ITF-14). Code 128 follows ISO/IEC 15417 and picks code sets A, B and C automatically to make the shortest possible barcode, with the mod 103 check character. Reference patterns for every symbology are pinned in automated tests and match an independent encoder, and the downloaded PNGs were decoded back with the open-source zxing-cpp reader during testing.

Sharpness is designed in. Each bar is a whole number of pixels wide (you choose 1 to 10 pixels per module), and wide elements in Code 39 and ITF-14 are exactly 3 modules, so every bar edge in the PNG falls exactly on a pixel boundary: the bars have no grey, blurred edges for a scanner to misread (only the optional digits underneath are anti-aliased, like any text). For print, download the SVG: it is vector, so you can set the exact physical size in your layout software. At GS1's nominal size an EAN-13 is 37.29 mm wide including quiet zones with 22.85 mm bars (a 0.330 mm module).

One thing a generator cannot do is give you a valid product number. Retail EAN and UPC numbers are GTINs issued under a GS1 Company Prefix licensed from a GS1 Member Organisation; the barcode is only a picture of that number. Make up a number and the barcode will scan, but it will not identify your product in retailers' systems.

Everything runs in your browser: the number you type and the image you download never leave your device. You can confirm in your browser's developer tools (Network tab) that no request carries your data.

1. Your input is validated for the chosen symbology. Spaces and hyphens in product numbers are ignored; anything the symbology cannot encode is named in the error message. 2. For EAN-13, UPC-A, EAN-8 and ITF-14 the GS1 check digit is computed: multiply the digits by 3 and 1 alternately, starting with 3 at the rightmost digit, add them up, and take the amount needed to reach the next multiple of 10. If you typed the check digit, it is compared with this value. 3. Each character is converted to its bar pattern from the published tables — GS1 number sets A, B and C with the leading digit's parity pattern for EAN-13; GS1 wide/narrow patterns for ITF-14, interleaving bars and spaces in digit pairs; the 43-character Code 39 table with * start/stop and an optional mod 43 check character; and the 107-pattern Code 128 table. 4. For Code 128, a shortest-path search chooses where to use code set A (control characters), B (lowercase and symbols) or C (pairs of digits), adding SHIFT or code-change characters only where they make the barcode shorter. The check character is (start value + each value × its position) mod 103. 5. The modules are laid out as an SVG: quiet zones, bars at whole-pixel positions, guard bars extended 5 modules for EAN/UPC, bearer bars (4 modules thick) for ITF-14, and the human-readable text in a monospace font. 6. Download PNG draws that SVG onto a canvas at exactly its pixel size and saves it losslessly; Download SVG saves the vector file as it is.

Which barcode type to choose
 EncodesCheck digitTypical use
EAN-1313 digitsRequired (GS1 mod 10)Retail products worldwide, books (ISBN)
UPC-A12 digitsRequired (GS1 mod 10)Retail products in the US and Canada
EAN-88 digitsRequired (GS1 mod 10)Very small retail packs
ITF-1414 digitsRequired (GS1 mod 10)Outer cartons and cases in logistics
Code 128Any plain-ASCII textRequired (mod 103, automatic)Shipping labels, inventory, serial numbers
Code 39A–Z, 0–9, space, - . $ / + %Optional (mod 43)Industrial labels, ID badges, older systems

Worked examples

  • EAN-13 400638133393 → check digit 1 is added, giving 4006381333931: 95 modules of bars, 113 with the quiet zones (339 × 169 px at 3 px per module and 120 px bars).
  • EAN-13 4006381333932 → no barcode; the message says the check digit should be 1, not 2, so the full number is 4006381333931.
  • UPC-A 03600029145 → check digit 2 is added, giving 036000291452; the first and last digits are printed outside the guard bars.
  • Code 128 12345 → Start C, 12, 34, Code B, 5, check character 54, Stop: an odd run of digits is packed in pairs and the last digit switches to code set B.
  • Code 39 ABC with the mod 43 check ticked → ABCX, because A, B and C have values 10, 11 and 12, and 33 is the value of X.

How to use Barcode Generator

  1. Choose the barcode type from the Type menu — EAN-13 or UPC-A for retail products, Code 128 for general text.
  2. Type your number or text in the box below. For EAN, UPC and ITF-14 you can leave off the check digit; it is calculated for you.
  3. Adjust Bar width px, Height px, the Text checkbox and the Bars and Background colours. The preview updates as you type.
  4. Click Download PNG for an image, or Download SVG for print and scaling. Use Copy number to copy the full number including the check digit.

Common errors

  • "The check digit is wrong: for 400638133393 it should be 1, not 2" — the last digit of the number does not match the GS1 check digit, which usually means a typo. Check the number, or enter it without the last digit and let the tool add the correct one.
  • "EAN-13 needs 12 digits (the check digit is added for you) or 13 digits including the check digit — you entered 5." — EAN and UPC numbers have a fixed length (EAN-13: 12 or 13, UPC-A: 11 or 12, EAN-8: 7 or 8, ITF-14: 13 or 14).
  • "Code 39 has no lowercase letters" — Code 39 encodes only capitals, digits, space and - . $ / + %. Type in capitals, or switch to Code 128.
  • "Code 128 encodes plain ASCII only" — accented letters, emoji and other non-ASCII characters cannot go in a Code 128 barcode. Replace them, or use a QR code.
  • The barcode does not scan after printing — usually low contrast, light bars on a dark background, red bars (invisible to red-light laser scanners), a missing quiet zone or the image being resized with smoothing. The tool warns about the colour problems; keep the white margin and scale the SVG rather than stretching the PNG.
  • A store or marketplace rejects the barcode — the barcode is fine, but the number is not a GTIN licensed to you. Retail numbers come from GS1, not from a barcode generator.

FAQ

How do I make a barcode for free?

Pick the barcode type, type your number or text, and click Download PNG or Download SVG. It is free, with no sign-up and no watermark, and works in any modern browser on a computer or phone.

Do I need to buy a UPC or EAN number to sell my product?

For retail, the number itself has to be a GTIN issued under your GS1 Company Prefix, which is licensed from your country's GS1 Member Organisation. This tool draws the barcode for a number you already have; it does not issue or register numbers. GS1's rules also say a company prefix licence must not be sold or given to another company.

What is the difference between UPC and EAN barcodes?

UPC-A holds 12 digits and is used mainly in the US and Canada; EAN-13 holds 13 digits and is used in the rest of the world. A UPC-A is an EAN-13 with a leading 0, which is why the bars are identical and scanners read either.

Which barcode type should I use?

Use EAN-13 (or UPC-A in North America) for products sold in shops, ITF-14 for shipping cartons, and Code 128 for your own labels such as stock codes, serial numbers or asset tags. Code 39 is mainly for older systems that require it; Code 128 is narrower for the same text.

How do I make a Code 128 barcode with letters and numbers?

Choose Code 128 and type the text — any mix of letters, digits and symbols from plain ASCII, up to 80 characters. The generator switches between code sets automatically, packing runs of digits two per symbol, so the barcode is as short as possible.

Will the barcode scan, and what size should I print it?

The patterns follow the GS1 and ISO tables and the PNGs were decoded by an independent reader during testing, so a correctly printed barcode will scan. GS1's nominal EAN-13 is 37.29 mm wide including quiet zones with 22.85 mm bars; use the SVG to set an exact size and keep black bars on a white background.

Can I make an ISBN barcode for a book?

Yes for the main barcode: an ISBN-13 starting 978 or 979 is printed as an EAN-13, so choose EAN-13 and type the ISBN without hyphens. The optional 5-digit price add-on that some books carry is not supported here.

Is my data uploaded anywhere?

No. The barcode is generated by JavaScript in your browser and the PNG is drawn on a local canvas, so the number or text never leaves your device. You can check the Network tab in your browser's developer tools.

G

Prefer AllUtil on Google

One click adds AllUtil to your Google preferences. You'll see our tools highlighted with a Preferred badge in Search and AI answers.

2× more likely to clickWorks in AI Overviews

Reviewed by unreviewed

Written by Hamza AK. We research, build and test every tool before it is published.

Editorial policy

Last updated

Rechecked against the sources on this date, not stamped.

Methodology

The bar patterns are exact: they come from the GS1 General Specifications and the Code 128 character table, and are pinned in tests against an independent encoder (zxing-cpp). Wide elements in Code 39 and ITF-14 use a 3:1 ratio, inside the permitted ranges (GS1 allows 2.25:1 to 3:1 for ITF-14). ITF-14 bearer bars are drawn 4 modules thick — above GS1's 2-module minimum for printing without plates; plate-printed cartons need GS1's 4.83 mm frame, so check the thickness in your artwork. The human-readable text uses a monospace system font rather than the OCR-B font of the specification. Not supported: UPC-E, EAN-2/EAN-5 add-ons, GS1-128 (Code 128 with FNC1 and Application Identifiers), full-ASCII Code 39 and non-ASCII text in Code 128.