Barcode Generator
Generate a real, scannable barcode and download it as a PNG or copy it as SVG for print. Code 128 for anything textual, Code 39 for capitals and digits on VIN labels, badges and parts, EAN-13 and UPC-A for retail with the check digit calculated for you. Everything is encoded in your browser, so your SKUs and order numbers are never uploaded.
Any text: inventory, shipping, asset tags. Runs of four or more digits are automatically packed two per symbol, which is why a long order number stays narrow enough to fit a label.
Common questions
- Which barcode type do I need?
- Code 128 for internal use such as inventory, asset tags and shipping references, because it encodes letters, digits and punctuation. Code 39 when a system or label standard asks for it, such as VIN labels, ID badges and older warehouse scanners; it takes capitals and digits only. EAN-13 for retail products sold anywhere in the world, and UPC-A for retail in the US and Canada. If you are labelling your own shelves, Code 128. If the item will be scanned at a till, you need a real, registered EAN or UPC.
- What is the check digit and why does it change my number?
- The last digit of an EAN-13 or UPC-A is calculated from all the others using alternating weights of 1 and 3. It lets a scanner detect a misread. Enter the first 12 digits and the correct one is appended; paste all 13 and it is verified, so a typo anywhere in the number is caught here rather than at the till.
- Why is my Code 128 barcode shorter than I expected?
- Runs of four or more digits are packed two per symbol using Code 128's code set C. A twenty-digit tracking number becomes about half the width it would otherwise be, which is often the difference between fitting a label and not. The encoder switches modes automatically and switches back for letters.
- Do I need Code 128A, 128B or 128C?
- Code 128 has three code sets, and the encoder picks them for you: B for letters and punctuation, and C for runs of digits, packed two per symbol so long numbers stay narrow. A scanner returns the same text whichever set drew it, so a request for Code 128A, 128B or 128C is met by the barcode made here. Set A's control characters, such as tab or carriage return, are not supported.
- Will this scan reliably when printed?
- Yes, if you keep two things. First, the quiet zone, the blank margin either side of the bars, which is included here and must not be cropped. Second, enough size: print at 2× or higher and avoid scaling the image down afterwards. Download the PNG, which is rendered at double resolution, or copy the SVG, which stays sharp at any size. To test a file before printing, open the PNG in the Barcode Scanner page, which reads it back from the picture.
- Can I sell products using a barcode I generated here?
- The symbol will be technically valid and will scan, but a retail barcode also needs a number you are entitled to use. EAN and UPC numbers are issued by GS1, and retailers check they are registered to you. This tool encodes any number correctly, but it cannot assign you one.
- Can I put the barcode in Word, Excel, Google Sheets or Illustrator?
- Yes, one barcode at a time. Download the PNG and insert it as a picture in Word, Excel, Google Docs or Google Sheets. For Illustrator, Inkscape or other vector software, paste the copied SVG into a plain text file saved with a .svg ending and open that: the bars stay sharp at any size. There is no add-in: for a whole column, see the next answer.
- How do I make barcodes for a whole column in Excel or Google Sheets?
- Use Code 39 with a barcode font, no add-in needed. Install Libre Barcode 39, an open-licence font from Google Fonts (in Google Sheets, add it under Font, More fonts). Next to a value in A1, enter ="*"&A1&"*" and set that cell's font to Libre Barcode 39. The asterisks are Code 39's start and stop characters, the same ones this page adds. It works for capitals, digits, space and - . $ / + % only. Code 128, EAN-13 and UPC-A need a check calculation a font cannot do, so make those here one at a time. To check the result, save a screenshot of the cells and open it in the Barcode Scanner page, which reads it back.
- Does it work on a phone?
- Yes. It runs in any current browser on an iPhone, Android phone, tablet, Mac, Windows PC or Chromebook, with nothing to install. Download PNG saves the image to the device, ready to print or share.
- What does the Random button do?
- It fills in a valid value for the selected type. For Code 128 and Code 39 that is four letters and six digits. For EAN-13 and UPC-A it is a number in the GS1 range 040 to 049, which is kept for a company's internal use, so it is never a number issued to a product sold in shops. Use random values for mockups, placeholder labels and testing a scanner.
- Which barcode types does this page not make?
- QR codes are made on the Bulk QR Code Generator and Data Matrix codes on the Data Matrix Generator. PDF417, Aztec, ITF-14, GS1-128, GS1 DataBar, EAN-8, UPC-E and postal barcodes such as Intelligent Mail are not drawn here. The page makes one barcode at a time, with no batch mode or label-sheet layout.
- Is my data sent to a server?
- No. The encoding is done in your browser and so is the image. That is worth knowing for barcodes specifically, since the values are usually internal SKUs, order references or asset numbers you would rather not paste into someone else's website.
Exact. Check digits and bar patterns follow each symbology's specification, and every encoder is tested by reading its bars back with an independent decoder. Print at a size your scanner can resolve. Encoding correctly does not guarantee a scan off a phone screen.