What is a barcode generator?
A barcode generator turns a number or text into a scannable image. Magic Random's generator supports the formats most people need: Code 128 for internal labels and shipping, EAN-13 and UPC-A for retail products, EAN-8 for small packs, ITF-14 for cartons, Code 39 for industrial use, and QR codes for links, Wi-Fi and contact cards. Retail check digits are calculated for you, and every value is validated before it's drawn.
Download a crisp PNG for labels, an SVG for print and design files, or paste a list to generate up to 200 barcodes on one printable sheet. Everything runs in your browser.
How to use the barcode generator
- Choose the formatCode 128 for text and SKUs, EAN-13 or UPC-A for retail, QR for links and Wi-Fi. The hint under the format shows what it accepts.
- Enter the valueType the number or text. For EAN and UPC, enter the digits without the check digit and it's added; the barcode updates as you type.
- Adjust size and colourSmall, medium or large; dark bars on a light background scan best. Untick Show value to hide the printed number.
- Download or bulk-generatePNG for labels, SVG for print, Copy image for documents. Open Bulk, paste a column from Excel, and print the sheet or save it as a PDF.
What people use it for
- Inventory and asset tagsCode 128 labels for stock, equipment and library books, read by any USB or phone scanner.
- Retail productsEAN-13 or UPC-A images for packaging once you have your GS1-assigned number; ITF-14 for the outer case.
- Shipping and warehouseBulk Code 128 labels from a spreadsheet of order numbers, printed as a sheet.
- Shopify, Etsy and Amazon listingsGenerate the barcode image for your product's assigned GTIN to put on packaging and listings.
- QR codes for menus, Wi-Fi and eventsLink to a menu or form, share the office Wi-Fi, or put a contact card on a business card.
- Tickets, badges and couponsUnique codes per ticket or badge, generated in bulk and verified on the door.
Barcode formats compared
| Format | Holds | Best for | Needs an official number? |
|---|---|---|---|
| Code 128 | Letters, numbers, symbols | Inventory, shipping, text | No |
| EAN-13 | 13 digits | Retail products worldwide | Yes, from GS1 |
| UPC-A | 12 digits | Retail in US and Canada | Yes, from GS1 |
| EAN-8 | 8 digits | Small packaging | Yes, from GS1 |
| ITF-14 | 14 digits | Cases and cartons | Yes, based on the GTIN |
| Code 39 | A–Z, 0–9, some symbols | Industrial, badges, older scanners | No |
| QR code | Up to ~1,500 characters | Links, Wi-Fi, menus, payments | No |
GS1 is the global body that assigns product numbers (GTINs). A barcode made from an unassigned number may scan, but it isn't a valid product code for retail.
Need test data to go with your labels? The fake name generator makes fictional customers, and the random letter generator makes letters-and-numbers codes.
Frequently asked questions
How do I make a barcode from a number?
Pick the format, type the number and the barcode appears instantly. For retail formats (EAN-13, UPC-A, EAN-8, ITF-14) enter the digits without the check digit and it's calculated and added for you, or enter all digits and the tool verifies the check digit is right. Download as PNG for labels or SVG for print files.
Which barcode format should I use?
Code 128 for anything internal: inventory, shipping, asset tags, text. EAN-13 for retail products sold outside North America, UPC-A for retail in the US and Canada, EAN-8 for tiny packages, ITF-14 for outer cartons, Code 39 for older industrial scanners, and a QR code for links, menus, Wi-Fi and payments. The format picker shows what each one accepts.
Is the barcode generator free?
Yes, free with no watermark, no account and no limit. Single codes and bulk batches of up to 200 are generated in your browser and never uploaded.
Can I make a UPC or EAN barcode for Shopify or Amazon?
You can generate the image here, but the number itself must come from GS1, the organisation that issues unique product codes, or from the marketplace (Amazon can assign one). Making up a 12-digit number produces a valid-looking barcode that will collide with someone else's product. For internal SKUs use Code 128 instead.
What is a check digit and do I need one?
The last digit of an EAN or UPC number is a check digit computed from the others, so scanners can spot a misread. You don't need to work it out: enter the first 12 digits of an EAN-13 (11 for UPC-A, 7 for EAN-8, 13 for ITF-14) and the tool adds it. If you paste the full number, the tool confirms the check digit is correct.
Can I generate barcodes in bulk from Excel?
Yes. Open Bulk, paste a column of values (one per line, up to 200), and press Generate all. Each value is validated and rendered on a label grid you can print or save as a PDF from the print dialog. Invalid values are flagged rather than silently skipped.
Can I download as PNG, SVG or PDF?
PNG (high resolution, for labels and web) and SVG (vector, for print and design tools) from the buttons under the barcode. Copy image puts a PNG on your clipboard. For PDF, use Bulk and Print / save as PDF.
Can I make a QR code for Wi-Fi or a contact card?
Yes. Choose QR code, then Link, Text, Wi-Fi or Contact card. The Wi-Fi option builds the standard WIFI: string so phones join the network when scanned; Contact card builds a vCard that saves to the phone's contacts.
Why won't my barcode scan?
Usually print size or contrast. Keep bars dark on a light background, leave at least 2 mm of empty space on each side, don't scale the image below about 80% of its generated size, and avoid printing on glossy or dark material. For EAN and UPC, make sure the number is a real assigned code. Test one label with a phone before printing a batch.
Can I change the barcode colour?
Yes, use the Bars and Background pickers. For reliable scanning keep high contrast: black or dark navy bars on white scan best; red bars often fail because many scanners use red light.
Is this barcode generator safe to use?
Everything is generated in your browser with open-source libraries; nothing you type is sent to our servers, so product numbers, SKUs and Wi-Fi passwords stay on your device.
What's the difference between a barcode and a QR code?
A barcode (1D) holds a short number or text in vertical bars and needs a laser or camera scanner. A QR code (2D) holds far more, including links, in a square of dots any phone camera can read. Use barcodes for products and inventory, QR codes for sharing information with people.
Last updated 2026-10-27. This tool runs in your browser; nothing you type is sent to our servers unless the page says so.