Barcode Generator
Part of Media tools: See all Media tools.
What is Barcode Generator?
A free barcode generator for ten linear barcode types: Code 128, GS1-128, Code 39, EAN-13, EAN-8, UPC-A, UPC-E, ITF-14, Interleaved 2 of 5 and Codabar. It works out or checks check digits, explains any data that does not fit the type, and downloads PNG, 300 dpi PNG or SVG at a print size you choose. It runs in your browser.
How to use Barcode Generator
- Choose the barcode type, for example Code 128 for your own labels or EAN-13 and UPC-A for retail products.
- Type the data. For EAN and UPC you can leave off the check digit and it is added for you.
- Adjust bar width, height, text, colours and quiet zones if needed, and set the print size in millimetres per module.
- Download PNG, PNG for print (300 dpi) or SVG, copy the SVG code, or print.
- Tick One barcode per line to make up to 100 barcodes at once.
Why use this tool?
Many free barcode sites draw whatever you type, even when the check digit is wrong or the data does not fit the type, and give you a small blurry image. This one validates the data first, adds GS1 separators and check digits correctly, gives print-ready files at a real physical size, and every type was tested by reading thousands of generated barcodes back with an independent decoder. Files are processed for your request and discarded.
FAQ
- Which barcode type should I use?
- For your own labels, stock numbers and asset tags, use Code 128: it takes any keyboard character and stays compact. Retail products need EAN-13 (worldwide) or UPC-A (US and Canada), outer cartons ITF-14, and shipping labels with dates or batch numbers GS1-128. Use Code 39 or Codabar only when an older system requires them.
- Do I need to buy barcode numbers from GS1?
- Not for internal use such as stock locations or asset tags. For products sold in shops or on marketplaces such as Amazon, yes: EAN, UPC and ITF-14 numbers must be licensed to your company by GS1. This tool draws the barcode for a number you already have; it does not issue numbers.
- How is the check digit calculated?
- For EAN, UPC, ITF-14 and GS1 numbers, multiply the digits alternately by 3 and 1 starting from the right, add them up, and the check digit is the amount needed to reach the next multiple of 10. Type the number without it and the generator adds it, or type the full number and it tells you if the check digit is wrong and what it should be.
- Can I download the barcode for printing?
- Yes. Download SVG saves a vector file sized in millimetres from your print size setting, and PNG for print saves a 300 dpi image that label and word-processing programs place at the right size. Print at 100% or actual size, not fit to page, and scan a test print first.
- What size should a barcode be?
- Retail EAN-13 and UPC-A barcodes are designed around 0.33 mm per module, about 37 mm wide for EAN-13, and can usually be printed at 80% to 200% of that. Set Print size in millimetres per module and the page shows the resulting width. Keep the quiet zones blank on both sides.
- Can I make many barcodes at once?
- Yes. Tick One barcode per line and paste up to 100 values, one per line. Each valid line gets its own barcode with PNG and SVG buttons, the main buttons download them all, and Print puts them on one sheet. Lines that do not fit the chosen type are listed with the reason.
- Is my data uploaded?
- No. The barcodes are drawn in your browser and the files are made on your device. The data you type is not sent to our server.
What this barcode generator does
This page draws one-dimensional barcodes, the familiar rows of black bars, in ten common types: Code 128, GS1-128, Code 39, EAN-13, EAN-8, UPC-A, UPC-E, ITF-14, Interleaved 2 of 5 and Codabar. Choose a type, type your data and the barcode appears straight away. If the data does not fit the type, for example a letter in an EAN-13 number or a wrong check digit, the page says exactly what is wrong instead of drawing a barcode that will not scan.
When the barcode looks right you can download it as a PNG image for screens and documents, as a 300 dpi PNG that label and word-processing programs place at the correct physical size, or as an SVG vector file set to a print size you choose. You can also copy the SVG code or print it directly. Tick One barcode per line to make up to 100 barcodes at once, each with its own download buttons, and print them together on one sheet.
Every barcode type here was tested by drawing thousands of random examples and reading them back with an independent barcode decoder. All of the work happens in your browser, so product numbers and internal codes never leave your device.
How to make a barcode
- Pick the barcode type. If you are not sure which one you need, the section below explains each one.
- Type or paste your data into Data to encode. For EAN and UPC you can type the number without its last digit and the check digit is added for you, or type the full number and it is checked.
- Adjust the look if you need to: bar width in pixels, bar height, text size, colours, whether the text appears under the bars and whether quiet zones are included.
- Set Print size to the width in millimetres you want each narrow bar (one module) to be when printed. The SVG download and the 300 dpi PNG use this size.
- Download PNG, PNG for print or SVG, or press Print. Always scan a test print with the scanner or phone app you will actually use before printing a whole roll of labels.
Which barcode type should I use?
Code 128 is the best general choice for your own labels: stock numbers, asset tags, order numbers, library or event tickets. It encodes every character on a standard keyboard, upper and lower case, and packs pairs of digits into one symbol, so long numbers stay short. The generator switches between Code 128's three code sets automatically to make the barcode as narrow as possible.
GS1-128 is Code 128 with a special start that tells the scanner the data follows GS1 rules. It is used on shipping labels and pallets and carries several pieces of information at once, each with an Application Identifier in brackets, such as (01) for the product number, (17) for an expiry date written YYMMDD and (10) for a batch or lot. Type it the way it is printed, for example (01)09501101530003(17)271231(10)LOT42. The generator checks the length of fixed-length fields, checks the check digit in (00), (01), (02) and (41), and adds the separators the standard needs after variable-length fields.
Code 39 is older and wider but still common in manufacturing, defence and automotive labels, and in older systems that only read Code 39. It covers capital letters, digits, space and - . $ / + %. Lower-case letters are changed to capitals unless you tick Full ASCII, which writes each lower-case letter or symbol as a pair of Code 39 characters. A scanner only turns those pairs back into the original character when its Full ASCII setting is on. An optional mod 43 check character can be added; turn it on only if your scanner expects it.
EAN-13 and UPC-A are the retail barcodes on almost every product in shops. UPC-A, with 12 digits, is used mainly in the United States and Canada; EAN-13, with 13 digits, everywhere else. Books use EAN-13 numbers starting 978 or 979, which are their ISBNs. EAN-8 and UPC-E are shorter versions for very small packs. UPC-E is a compressed UPC-A: the generator can shorten a UPC-A number for you when it has the right run of zeros, and tells you when it cannot.
ITF-14 goes on outer cartons and cases. It carries a 14-digit GTIN and is usually printed with a thick bearer bar frame around it, which helps it scan when printed straight onto corrugated cardboard. Interleaved 2 of 5 is the same symbology for any even-length run of digits, used in warehouses and on some tickets. Codabar is an old format still found in libraries, blood banks and parcel systems; it takes digits and a few symbols between start and stop letters A to D.
Check digits, done for you
Most barcode types end with a check digit worked out from the other digits, so a scanner can tell when it has misread a bar. For EAN-13, EAN-8, UPC-A, UPC-E, ITF-14 and the GS1 product and shipping numbers, the rule is the same: starting from the right, multiply the digits alternately by 3 and 1, add them up, and the check digit is whatever brings the total up to the next multiple of ten. Type the number without its check digit and the generator adds it. Type the whole number and it confirms the check digit, or tells you the correct one, so a typing mistake does not end up printed on thousands of labels.
Code 128 and GS1-128 also have a check character, but it is built into the bars and never shown in the text. Code 39 and Interleaved 2 of 5 have optional check characters; tick Add optional check digit only if the system reading the barcode expects one, because a scanner that does not expect it will return it as part of your data.
Getting a barcode that scans
- Leave the quiet zones. Scanners need a blank margin on each side, about ten times the width of the narrowest bar. The generator includes it by default. If you switch it off, keep the space clear on your label yourself.
- Use dark bars on a light background. Black on white is safest. The page warns you when the contrast is low, when the bars are lighter than the background, or when the bars are red, which red-light laser scanners cannot see.
- Do not stretch the image unevenly. Resize a barcode by changing Bar width or Print size here rather than squashing it sideways in another program. The SVG file is the safest for printing because it stays sharp at any size.
- Mind the size. Retail barcodes are designed around a module of 0.33 mm, which makes an EAN-13 about 37 mm wide, and can usually be printed between 80% and 200% of that. Very small barcodes on low-resolution thermal printers can lose thin bars, so test first.
- Keep it short. Every character adds width. If a Code 128 barcode is getting too wide for your label, shorten the data or use a 2D code such as a QR code instead.
Do I need to buy barcode numbers?
For your own internal use, no. Stock locations, asset tags, membership cards and order numbers can use any data you like, usually in Code 128. For products sold through shops, supermarkets or large online marketplaces, yes. EAN, UPC and ITF-14 numbers are GTINs, and retailers and marketplaces such as Amazon expect the number to be licensed to your company by GS1, the organisation that runs the system, through your local GS1 office. A barcode made here from a number you invented will scan, but it will not be accepted as a genuine product identifier and may clash with another company's product.
The generator points out a few number ranges with special meanings: EAN-13 numbers starting 978 or 979 are book ISBNs, 977 is used for magazines, and numbers starting 20 to 29 (or UPC numbers starting 2) are reserved for use inside one store, for example for weighed goods. It does not check whether a number has really been issued to anyone, because that information is not public.
Downloads and print size
Download PNG saves exactly what you see, at the bar width you set in pixels. This suits web pages, spreadsheets and documents viewed on screen.
PNG for print (300 dpi) redraws the barcode so that each module is the nearest whole number of pixels to your print size at 300 dots per inch, and marks the file as 300 dpi, so programs such as Word and most label software place it at the right physical size. The report under the barcode shows the module width that results, for example 4 pixels, or 0.339 mm, for a 0.33 mm setting.
Download SVG (print size) saves a vector file with its width and height set in millimetres from your print size. Vector files stay perfectly sharp and are what printers and designers prefer. Copy SVG code puts the same drawing, sized in pixels, on your clipboard for pasting into a web page.
Print sends the barcode, or every barcode in a batch, to your printer at the chosen print size. Set the printer to 100% or actual size, not fit to page, or the size will change.
Making many barcodes at once
Tick One barcode per line and paste a list, one value per line, up to 100 lines. Each valid line gets its own barcode with PNG and SVG buttons, and the main download buttons save them all. Lines that do not fit the chosen type are listed in red with the reason, so one bad row in a spreadsheet does not stop the rest. For more than 100 codes, split the list into several batches.
Limits, honestly
- This page makes linear barcodes only. For QR codes use the QR code generator. Data Matrix, PDF417, MSI, Pharmacode and EAN add-on codes for magazines and books are not offered.
- Code 128 covers the standard ASCII characters only. Accented letters and other non-English characters are refused rather than encoded in the rarely supported extended mode.
- Wide bars in Code 39, Interleaved 2 of 5, ITF-14 and Codabar are three times the narrow ones, a ratio inside every standard's range. It cannot be changed.
- The text under the bars uses a monospace font from your device. Some retail specifications ask for the OCR-B font; the bars, which are what scanners read, are not affected.
- The generator cannot test your printer. Thermal printers, cheap inkjets and glossy labels all change bar widths a little, so scan a test print first.
Privacy
The barcodes are drawn by code running in your browser. The data you type, the images and the files you download are made on your device and are not sent to our server, so it is safe to use for internal stock numbers and unreleased product codes.
Related tools
For 2D codes that hold web addresses, Wi-Fi details or longer text, use the QR code generator. To turn text into binary or hex codes, use the text to binary converter, and to make unique identifiers for labels or database records, use the UUID generator.
Also try
Related tools that work well with this one: