A barcode generator turns a number or a piece of text into a barcode that machines can scan. With this free tool you can make 14 kinds of line barcodes (such as EAN-13, UPC-A, Code 128 and Code 39) and 4 kinds of square codes (QR Code, Data Matrix, PDF417 and Aztec). It adds check digits for you, makes hundreds of codes at once, and gives you print-ready PNG, SVG and PDF files. Everything is made in your browser, so your data is not uploaded to a server.
Key facts at a glance
| Types | 18 in total. Line barcodes: Code 128, Code 39, EAN-13, EAN-8, UPC-A, UPC-E, ISBN, ITF-14, Interleaved 2 of 5, Codabar, MSI Plessey, Pharmacode, EAN-5 and EAN-2 add-ons. Square codes: QR Code, Data Matrix, PDF417, Aztec Code. |
| Check digits | Added and checked for you on EAN, UPC, ISBN and ITF-14. Optional on Code 39 and MSI. |
| Many at once | A list of up to 500 values, or a number sequence with a prefix, suffix, step and zero padding. |
| Downloads | PNG with a print resolution (72 to 600 DPI), SVG, copy to clipboard, a ZIP of all codes, and a PDF sheet of labels. |
| Style | Bar width and height, margins, colours, transparent background, rotation, frame, fonts and text position. |
| Cost and privacy | Free. No account, no watermark. Your values stay on your device. |
| Important | This tool makes the picture of a code. It does not give you official product numbers. For shop products, get your numbers from GS1. |
What is a barcode generator?
It is a tool that draws a barcode for you. A barcode is a pattern of bars, or squares, that stores a number or some text. A scanner reads the pattern and gives the same number or text back to a computer. Shops, warehouses, libraries, post offices and ticket gates all use them.
Line barcodes (1D) are read in one direction, and they hold a short number or a short text. Square codes (2D) are read in two directions, and they hold much more, such as a web address. This tool makes both kinds.
How do I make a barcode?
You choose the type, enter your text, and download the picture. The barcode updates as you type.
- Choose a type. Pick it from the list. A short note under it explains what the type is good for, and the Use an example button fills in a working sample.
- Enter your content. Type your number or text. If it is not allowed for that type, the tool tells you why, for example “Digits only, please.”
- Adjust the look. Open 3. Size and colours to change the bar width, height, margins, colours and rotation. Open 4. Text under the bars to change the text.
- Download. Use ⬇ PNG for pictures, ⬇ SVG for sharp printing at any size, or Copy image to paste it into a document.
Which barcode type should I use?
Use the type your shop, warehouse or customer asks for. If nobody has asked for a special type, Code 128 is a good choice for text and numbers, and QR Code is the best choice for links.
| Type | What it holds | Where it is used |
|---|---|---|
| Code 128 | Any text with basic characters (letters, numbers, symbols). | Inventory, shipping, asset tags, general labels. |
| Code 39 | Capital letters, numbers and - . space $ / + %. | Industry, ID cards, older systems. |
| EAN-13 | 13 digits (12 plus a check digit). | Products in shops around the world. |
| UPC-A | 12 digits (11 plus a check digit). | Products in the USA and Canada. |
| EAN-8 / UPC-E | 8 digits. | Small products with little space. |
| ISBN | A book number, 978 or 979 plus 10 digits. ISBN-10 is converted for you. | Books. An EAN-5 add-on can show the price. |
| ITF-14 | 14 digits, with bearer bars (a frame). | Cartons and cases. |
| Interleaved 2 of 5 | An even number of digits. | Logistics and cartons. |
| Codabar | Digits and - $ : / . +, with start and stop letters A to D. | Libraries, labs and blood banks. |
| MSI Plessey | Digits, with optional check digits. | Shelf labels and inventory. |
| Pharmacode | A whole number from 3 to 131070. | Pharmacy packaging. |
| EAN-5 / EAN-2 | 5 or 2 digits, placed next to a main code. | Book prices, magazine issue numbers. |
| QR Code | A lot of text, such as a web address. | Links, tickets, menus, Wi-Fi, payments. |
| Data Matrix | Short text in a very small square. | Electronic parts, small items. |
| PDF417 | A lot of text in a stacked code. | IDs, boarding passes, tickets. |
| Aztec Code | Compact text in a square code. | Transport tickets. |
What are the parts of a barcode?
A barcode is more than bars. Every part has a job, and a scanner needs all of them to read the code.
- Quiet zone. Empty space on both sides. Without it a scanner cannot tell where the code starts. The tool keeps the required minimum for product codes, even if you set a smaller margin.
- Guard bars. Longer bars at the start, middle and end of EAN and UPC codes.
- Data bars. The wide and thin bars that hold your number.
- Digits below. The number in text, so people can type it by hand if a scan fails.
- Check digit. A last digit that lets the scanner check that it read the code correctly.
What is a check digit, and does the tool add it?
A check digit is the last digit of a code. It is worked out from the other digits, so a scanner can catch a misread. For EAN-13, UPC-A, EAN-8, UPC-E, ISBN and ITF-14, the tool works it out for you. You can type the number without the check digit, or with it.
| Type | What you can type | What the tool does |
|---|---|---|
| EAN-13 | 12 or 13 digits | With 12, it adds the check digit. With 13, it checks the last digit and tells you the right one if it is wrong. |
| UPC-A | 11 or 12 digits | The same. |
| EAN-8 | 7 or 8 digits | The same. |
| ITF-14 | 13 or 14 digits | The same. |
| UPC-E | 6, 7 or 8 digits | Works out the check digit from the matching UPC-A number. |
| ISBN | 10 or 13 digits, with or without hyphens | Checks an ISBN-10, converts it to ISBN-13 and adds the right check digit. |
| Code 39, MSI | Any allowed value | Adds a check character or digit only if you choose it. |
| Code 128 | Any text | Has its own built-in check inside the code. You do nothing. |
How do I make many barcodes at once?
Switch Content from “One code” to “List (batch)” or “Number sequence”. The tool makes up to 500 codes at once. Click any code in the list under the preview to see it, and invalid lines are marked with the reason.
- List (batch). Paste one value per line. Good for part numbers, names or a list from a spreadsheet.
- Number sequence. Give a prefix, a suffix, a start number, how many, a step, and zero padding (3 to 12 digits). For example BOX-0001 up to BOX-0024.
- ZIP. Press ⬇ ZIP (all) to get all valid codes as PNG files or as SVG files.
- PDF label sheet. Press ⬇ PDF label sheet to get a printable page of labels. Choose A4 or US Letter, the number of columns and rows, the page margin, the gap, and how many copies of each code.
| Sheet layout | Labels per page | Good for |
|---|---|---|
| A4 · 3 × 8 | 24 | Medium labels, such as shelf and parcel labels. |
| A4 · 2 × 7 | 14 | Larger labels with more room. |
| A4 · 4 × 11 | 44 | Small labels, such as price tags. |
| Letter · 3 × 10 | 30 | The common US Letter label layout. |
| Custom | Your choice | Any grid, up to 10 columns and 20 rows. |
What size, colour and resolution should I use?
A good barcode is dark, clear and not too small. Black bars on a white background are the safest. The checklist below keeps your codes easy to scan.
- Contrast. Dark bars on a light background. Do not use white bars on black, and avoid red bars.
- Bar width. For EAN-13 and UPC-A, one bar is normally about 0.33 mm wide. Scanners allow roughly 80% to 200% of that. At 300 DPI, a bar of 4 pixels is about 0.34 mm.
- Bar shrink. Printing makes ink spread a little, so bars look fatter. The Bar shrink slider makes each bar slightly thinner to make up for it.
- Do not stretch. Keep the proportions. Make the code bigger by raising the bar width, not by resizing the picture in another program.
- Test. Print one, and scan it with your scanner or phone before you print a hundred.
| Resolution | Where it is used |
|---|---|
| 72 or 96 DPI | Screens and web pages. |
| 150 DPI | Quick office printing. |
| 203 DPI | Many thermal label printers (8 dots per millimetre). |
| 300 DPI | Laser and good inkjet printers, and some label printers. |
| 600 DPI | Fine print, and very small codes. |
The PNG you download carries the DPI you pick, so a graphics or label program places it at the right physical size. For the sharpest result at any size, use the SVG or the PDF.
Which download should I choose: PNG, SVG, PDF or ZIP?
| Download | Best for | Good to know |
|---|---|---|
| PNG | Web pages, Word, slides and most label software. | A picture. It carries your chosen DPI, so it prints at the right size. |
| SVG | Print shops, design software and very sharp printing. | Vector shapes. You can scale it up without losing sharpness. |
| Copy image | Pasting straight into a document or chat. | Copies a PNG to your clipboard. |
| ZIP | Many codes at once. | Contains PNG or SVG files, named after the values. |
| PDF label sheet | Printing a page of labels. | Line codes are sharp vector shapes. Square codes are pictures. |
How we tested it
A barcode that does not scan is useless, so we checked the tool in three ways before writing this page.
- Against a reference library. We compared the bar patterns made by our code with the well-known open-source library JsBarcode. We tried 44 inputs across Code 128 (sets A, B and C), Code 39 (with and without a check character), EAN-13, EAN-8, UPC-A, UPC-E, ITF-14, Interleaved 2 of 5, Codabar, MSI (all check types), Pharmacode, EAN-5 and EAN-2. The patterns were the same in every case except one UPC-E input that the reference library cannot make.
- With a scanner program. We drew the codes as pictures and read them with an independent barcode reader (zxing-cpp). Code 128, Code 39, EAN-13 (also with an add-on), ISBN, EAN-8, UPC-A, UPC-E, Interleaved 2 of 5, ITF-14 and Codabar all gave back the right number. We tried four looks for each: normal, with bar shrink, rotated 90°, and small with the text on the left.
- The square codes. QR Code, Data Matrix (square and rectangle), PDF417 and Aztec Code were made with the bwip-js library and read back correctly.
- The downloads. We checked that the PNG carries 300 DPI when asked, and that the PDF label sheet, including a rotated label, can be scanned after printing to an image.
What this barcode generator cannot do
| You might want to | What happens |
|---|---|
| Get official product numbers | Not possible. This tool draws the code, but it does not register your number. For products sold in shops, get your numbers from GS1, the organisation that issues them. Random numbers can clash with someone else’s product. |
| Make GS1-128 or GS1 DataBar | Not supported. There is no special code with application identifiers. |
| Use other types | Code 93, Code 11, Telepen, Micro QR and similar types are not included. |
| Use accents, emoji or other alphabets in Code 128 | Code 128 supports basic characters only. Use a QR Code for such text. |
| Use lowercase in Code 39 | Code 39 has no lowercase letters, so the tool changes them to capitals. |
| Make more than 500 codes at once | The list and the sequence stop at 500. |
| Match your brand of label sheet exactly | The PDF layouts are simple grids. Test on plain paper first. |
| Grade your barcode | The tool does not measure print quality like a barcode verifier does. |
| Work fully offline | Line barcodes, PNG and SVG work after the page has loaded. Square codes, ZIP and PDF load a small helper file the first time you use them. |
| Keep your work next time | Nothing is saved. Use Copy share link to keep your settings and codes. |
Is my data uploaded anywhere?
No. Your codes are drawn by your own browser, and your downloads are made on your own device. The values you type, such as part numbers, never leave your computer.
Questions people ask
Yes. It is free, with no signup and no watermark. The site may show ads to cover its costs.
No. The codes are made in your browser, and the files are made on your device. Only small helper files for square codes, ZIP and PDF are downloaded from public CDNs when you use those features.
The picture is fine, but the number must be yours. Shops expect EAN-13 or UPC-A numbers issued by GS1, which gives each company its own prefix. This tool does not issue or register numbers. For internal use, such as inventory, you can use any number you like.
Code 128. It holds letters, numbers and symbols, it is compact, and almost every scanner reads it.
UPC-A has 12 digits and is used in the USA and Canada. EAN-13 has 13 digits and is used in the rest of the world. A UPC-A number is the same as an EAN-13 number with a 0 in front, and most scanners read both.
The last digit you typed does not match the other digits. The message tells you the right one. You can also type the number without its last digit, and the tool adds the correct check digit.
Choose “List (batch)” and paste one value per line, or choose “Number sequence” and set a prefix, a start number and how many. Then press ⬇ ZIP (all) for separate files, or ⬇ PDF label sheet for a printable page. You can make up to 500 at a time.
For EAN-13 and UPC-A, one bar is normally about 0.33 mm, and scanners accept about 80% to 200% of that. In practice, print at 100% size or a little larger, keep the empty margin, and scan a test print.
Codes made with the tool were read correctly by an independent scanner program in our tests. In browsers that can read barcodes, you also see a “scan check” result under the preview. Always scan a real printout before you print many.
Yes. Choose QR Code, type your text or web address, and pick an error correction level. A higher level (H) still scans when part of the code is damaged, but the code gets denser.
Code 39 has no lowercase letters, so the tool changes them to capitals. Use Code 128 if you need to keep lowercase.
Yes. Many thermal printers print at 203 DPI, so choose 203 DPI before you download the PNG, and set the bar width to a whole number of pixels. You can also download the SVG or the PDF and print from your label software.
Yes. Use dark bars on a light background for the best result. Avoid red bars and avoid white bars on a dark background, because many scanners cannot read them.
Hi, I’m Waqas, the person behind Brivonto. I build each tool on this site myself, test it, and keep improving it from your feedback. I wrote this page and checked the barcodes against a reference library and a scanner program before publishing. If you find a mistake, please tell me, and I will fix it. For shop products, please get your official numbers from GS1.

