Generate a barcode from text or numbers, ready to download.
Updated · Made by the My Digital Drawer team
Choose a barcode type such as CODE128, EAN-13 or UPC-A, type the number or text to encode, and the barcode appears instantly. Download it as a PNG image. Test it with a scanner before printing labels in bulk.
Pick the type your scanner, store or shipping partner asks for. If no one has asked for a type, CODE128 is the most flexible choice because it accepts letters as well as numbers.
| Type | What it holds | Typical use |
|---|---|---|
| CODE128 | Letters, digits and symbols (full ASCII) | Shipping labels, inventory, asset tags |
| EAN-13 | 12 digits + 1 check digit | Retail products worldwide |
| UPC-A | 11 digits + 1 check digit | Retail products in the US and Canada |
| CODE39 | A–Z, 0–9, space and - . $ / + % | ID badges, older industrial systems |
| ITF-14 | 13 digits + 1 check digit | Outer cartons and shipping cases |
| MSI | Digits only | Shelf labels in stores and warehouses |
| Pharmacode | A whole number from 3 to 131070 | Packaging control in pharmaceutical production |
Codes that you print on products for sale in stores (UPC-A and EAN-13) must use numbers assigned by GS1, the barcode standards body. For your own shelves, files, tickets or stock you can use any number you like.
UPC-A and EAN-13 end with a check digit that lets a scanner catch misreads. The tool adds it for you. Here is how it is worked out for the 11-digit UPC-A number 12345678901:
Different barcodes serve different jobs. CODE128 encodes letters and numbers and is widely used for shipping labels, inventory and internal IDs. EAN-13 and UPC-A are the numeric product codes printed on retail packaging. Enter your data, pick the format, and download a clean PNG.
Retail codes have strict rules: UPC-A needs 12 digits and EAN-13 needs 13, with the last digit acting as a check digit. Entering the wrong number of digits will produce an error or an invalid code.
Generating a barcode image does not give you ownership of a product number. Numbers for products sold in stores must be licensed from GS1, the organization that manages global barcode standards, and made-up numbers can clash with real products. For internal use, such as tracking your own tools, books or boxes, CODE128 with your own IDs is fine.
Print at a good size with high contrast and a clear margin on each side. A black bar code on a white background scans most reliably, and a test scan with a real scanner or phone app before printing a large batch saves wasted labels.
The barcode is drawn in your browser with the open-source JsBarcode library. The data you type is not sent anywhere.
CODE128 can hold any text and is a good general choice for inventory labels, ticket numbers and internal tracking. EAN-13 and UPC-A are the retail product formats and need exactly 13 and 12 digits. The last digit of those formats is a check digit that the scanner uses to catch misreads.
Other formats suit specific jobs: ITF-14 is used on shipping cartons, CODE39 appears in older industrial and ID systems, and Pharmacode is used in pharmaceutical packaging.
A barcode you generate here encodes the number you type, but it does not register that number to your product. Shops and marketplaces that need real product barcodes usually require numbers issued through GS1, the organization that assigns company prefixes. For your own inventory or events, any valid code is fine.
When printing, keep the barcode large, black on white, and leave a blank margin on both sides. Test it with a real scanner or phone camera before you print a whole sheet.
Scan the downloaded barcode with a phone app, and a real scanner if the label will be used with one. If it does not scan, make it larger, increase the contrast and make sure the number of digits matches the chosen format.
Which barcode type should I use?
CODE128 handles any letters, numbers, or symbols and is the most flexible choice. EAN-13 and UPC are fixed-format numeric codes used specifically for retail products and require a valid check digit.
Will this barcode scan correctly at checkout?
Standard scanners read CODE128, EAN-13, and UPC barcodes generated here without issue, as long as it's printed at a reasonable size (at least 1 inch wide is a safe rule of thumb).
Is there a limit to how many barcodes I can generate?
No — generate as many as you need. Each one is created instantly in your browser with no account or usage limit.
Can I print the barcode on labels?
Yes. Download the PNG and place it in your label layout. Print at a good size and test a sample with a scanner first.