Skip to content

Barcode Generator

Type the code, pick a format and the barcode appears instantly, ready to download as PNG or SVG. For EAN-13, UPC-A and ITF-14 the tool works out or verifies the check digit and shows the math. Everything happens in your browser: what you type is never sent anywhere.

Works anywhere in the world, wherever you are.

How many codes?
Format

Letters, digits and keyboard symbols, up to 80. No accents.

Bar width (px)

Between 20 and 300 px.

Between 0 and 60 px on each side.

#000000
#ffffff

Barcode ready

PR-2026-0001

Code 128

Format
Code 128
Image size
—

Loading the generator…

Everything is generated in your browser: what you type is never sent anywhere or saved. Only the format and design settings are remembered in this browser.

About this calculator

How it works

Pick a format and type the content. The tool checks that the characters and length are what that format allows and, if something is off, tells you exactly what: which character does not fit, how many digits are missing or what the last digit should be.

You can adjust the bar width (1 to 4 pixels per narrow bar), the height, the blank margin, whether to show the text underneath, and the colors. The preview updates with every change.

PNG is for pasting into a document or uploading to a page. SVG is a vector file: it scales without losing sharpness, and it is the one to send to a print shop or use in label software.

With Several (list) you paste up to 200 values, one per line, and download a ZIP with one file per code. Lines with problems are flagged by line number so you can fix them.

Which format to use

Code 128: the most flexible. It takes letters, digits and keyboard symbols, and it is compact. A good choice for inventory, assets, receipts, tickets or any internal code.

Code 39: older and wider, capitals, digits and a few symbols only. Use it when a system or scanner you already have asks for it.

EAN-13 and UPC-A: the ones on retail products. Digits only, fixed length, and the last digit is a check digit. UPC-A is the usual one in the United States and Puerto Rico; EAN-13 is the international one. A UPC-A is really an EAN-13 that starts with 0.

ITF-14: for shipping cases that hold several units of the same product, not for the product itself.

Example: the check digit of an EAN-13

Take the 12 digits 200123456789. Starting from the digit next to the check digit (the last one, 9) and moving left, each digit is multiplied by 3, then by 1, alternating.

The weighted sum is 97. The next multiple of 10 is 100, so the check digit is 100 − 97 = 3 and the full code is 2001234567893.

UPC-A and ITF-14 use the same rule. For the UPC-A 40012345678 the sum is 88, the check digit is 2 and the code becomes 400123456782. The ITF-14 1001234567890 also gets a 2: 10012345678902.

If you type the full code, the tool redoes the math and warns you if the last digit does not match. That almost always means a mistyped number.

An image is not a registered number

Anyone can draw an EAN or a UPC; what matters is the number. Supermarkets, chains and online stores require GTINs assigned to your company by GS1, the organization that manages these codes. A made-up number may belong to another company's product, and the store's system will mix them up.

To sell in stores, get your numbers from GS1 first (in the United States, GS1 US) and then use this tool to create the images.

For use inside your own business — shelf labels, goods you weigh and pack yourself, inventory — GS1 reserves numbers that never clash with products on the market: EAN-13 numbers starting with 2 and UPC-A numbers starting with 4. That is why the examples above start that way. For internal codes that are not products, Code 128 is usually more practical.

Tips so it scans

Leave a blank margin on each side of at least 10 times the narrow bar width (EAN-13 asks for 11 on the left). Without that space many scanners cannot find where the code starts.

Dark bars on a light background. Black on white is safest. Avoid red, orange or yellow bars: many scanners use red light, under which those colors look almost white. The tool warns you when the chosen colors have low contrast.

Do not stretch the image sideways or print it blurry. If you need a bigger code, raise the bar width or use the SVG. Before printing hundreds of labels, test one with a scanner or a phone camera.

Important limitations

  • The tool creates the barcode image; it does not register or assign product numbers. GTINs for selling in stores are assigned by GS1.
  • Code 128 here takes printable ASCII characters (no accents) up to 80, and Code 39 up to 40. These are practical limits of the tool so the code stays readable.
  • It does not make GS1-128 with application identifiers, QR codes, Data Matrix or EAN-8/UPC-E.
  • The contrast warning is a guide, not a print-quality certification. The only sure test is scanning a printed sample.
  • The PNG comes out at the exact pixel size you see; for large prints, use the SVG.

Frequently asked questions

The image, yes, but the number has to be yours. Stores require GTINs assigned to your company by GS1. Get the numbers first, then create the EAN-13 or UPC-A images here.

From the digit next to the check digit, moving left, multiply by 3, by 1, by 3, alternating, and add everything up. The check digit is whatever brings the total to the next multiple of 10. For 200123456789 the sum is 97, 3 more reaches 100, and the code becomes 2001234567893.

UPC-A has 12 digits and is the most common in the United States and Puerto Rico; EAN-13 has 13 and is the international standard. A UPC-A equals an EAN-13 with a leading 0, and today's scanners read both.

Code 128, almost always: it takes letters and digits, it is compact and any modern scanner reads it. If you want EAN-13 for products sold only in your store, use numbers starting with 2, which GS1 reserves for internal use.

Code 128 and Code 39 only encode ASCII characters, and accented letters such as ñ or é are not in that set. Type the word without the accent or use a numeric code.

No. The barcode is generated in your browser and what you type never leaves your device or gets saved. Only the format and design settings are remembered in this browser for next time.

This calculation runs in your browser and is never sent to a server. Your last values may be saved on your device only, for convenience. Results are estimates and are not financial, tax, accounting or legal advice.