Barcode generator: Code 128, EAN-13, UPC-A, Code 39 and ITF-14
Make Code 128, EAN-13, UPC-A, Code 39, ITF-14 and EAN-8 barcodes with automatic check digits, and download them as SVG or PNG.
Loading tool…
Pick a barcode type, type the value and the barcode is drawn instantly as a vector SVG, ready to download as SVG for print layouts or as a high-resolution PNG. Code 128 encodes any printable ASCII text and is the usual choice for internal labels, asset tags and shipping references. Code 39 is an older alphanumeric symbology still required by some industrial and government systems.
The retail formats have a check digit calculated with the GS1 modulo-10 rule: type the 12 data digits of an EAN-13 (11 for UPC-A, 13 for ITF-14, 7 for EAN-8) and the check digit is added for you, or type the full number and it is verified, with the correct digit shown if yours is wrong. That catches most typos before anything is printed.
Drawing a valid symbol is only half the story for products sold in shops: EAN and UPC numbers must be assigned to your company by GS1 (or supplied by the retailer), otherwise the number may clash with another product. The bars are drawn by JsBarcode, an MIT-licensed library, entirely in your browser.
How to use it
- Choose the barcode type.
- Type the value. For EAN, UPC and ITF-14 enter the digits without the check digit to have it added, or the full number to have it checked.
- Adjust the bar width, height, margin (quiet zone) and whether the text is shown under the bars.
- Download the SVG for print work or the PNG for documents, and test-scan it before printing a batch.
Frequently asked questions
Which barcode type should I use?
For products sold in shops, EAN-13 (worldwide) or UPC-A (US and Canada) with a GS1-assigned number. For outer shipping cartons, ITF-14. For internal labels, inventory and anything with letters, Code 128, which is compact and widely readable. Use Code 39 only when a system specifically requires it.
How is the check digit calculated?
For EAN, UPC and ITF-14, digits are weighted alternately 3 and 1 starting from the rightmost data digit, summed, and the check digit is the amount needed to reach the next multiple of 10. Code 128 has its own internal checksum that is added automatically and is not printed.
Can I use these barcodes on products in stores?
The symbol will scan, but retailers require an EAN/UPC number licensed from GS1 (or your country's GS1 office) so it is unique worldwide. Invented numbers can conflict with real products.
SVG or PNG?
SVG is vector, so it stays sharp at any size and is best for labels and packaging artwork. PNG is exported at three times the on-screen size for use in documents and apps that do not accept SVG.
Why is my barcode not scanning?
Keep the quiet zone (white margin) on both sides, print at a size where the thinnest bar is at least about 0.25 mm, use black bars on white, and avoid stretching the image unevenly.
Related tools
- Generate a QR code (PNG or SVG)Turn a URL or text into a QR code and download it as PNG or SVG. Generated locally; nothing is uploaded.
- Scan a QR code from your camera or an imageRead a QR code with your camera or from a screenshot, and see the content safely before opening any link.
- Wi-Fi QR code generatorMake a QR code that joins your Wi-Fi network when scanned, with correct escaping of special characters. The password never leaves your device.
- vCard QR code generator for contact detailsTurn your contact details into a QR code that adds you to a phone's contacts, plus a .vcf file. Built on your device.
- Invoice generatorFill in seller, buyer, line items and VAT to get a clean invoice you can print or save as PDF. No account, no watermark.
- Generate UUIDs (v4 or v7)Generate 1 to 100 random UUID v4 or time-ordered UUID v7 identifiers with crypto-grade randomness.