Barcode Generator - Code 128, EAN-13, ITF-14, Codabar
Developer Tools
Create Code 128, Code 39, EAN, UPC-A, ITF-14, and Codabar barcodes. Preview and export SVG or PNG. Processing stays in your browser.
Preview
How to use this tool
- Choose a format. Select the barcode format that matches your use case (e.g., Code 128 for general text, EAN-13 for retail products).
- Enter data. Type or paste the text or digits to encode.
- Customize. Adjust bar width, height, colors, and label visibility.
- Download. Copy SVG markup or download an SVG or PNG file for documents and printing.
Barcode formats explained
Code 128
Code 128 is the most widely used linear barcode in logistics and shipping. It encodes the full printable ASCII character set and produces compact barcodes. It is the default choice for general-purpose encoding.
Code 39
Code 39 (also called 3-of-9) is one of the oldest barcode formats. It supports uppercase letters (A–Z), digits (0–9), and a handful of special characters. Nearly every barcode scanner can read Code 39 without any special configuration, making it a safe choice for industrial and healthcare labels.
EAN-13
EAN-13 (European Article Number) is the international standard for retail product barcodes. It encodes 12 payload digits plus a check digit. Products sold outside North America typically use EAN-13.
EAN-8
EAN-8 is a compact version of EAN-13 used on small product packaging where space is limited. It encodes 7 payload digits plus a check digit.
UPC-A
UPC-A (Universal Product Code) is the standard barcode format for retail products in North America. It encodes 11 payload digits plus a check digit. Scanners in North America can also read EAN-13, since UPC-A is a subset of EAN-13.
ITF-14
ITF-14 encodes a 14-digit GTIN used to identify cases and other shipping units. Enter the 13 payload digits to add the check digit, or enter all 14 digits to have it checked. This preview does not draw bearer bars around the symbol, so check the requirements of your label printer and trading partners before using it on cartons.
Codabar
Codabar is a legacy linear format used by some libraries, healthcare systems, and couriers. It accepts digits and a small set of punctuation characters; optional A–D start and stop characters are supported. Check that the scanners and systems receiving the label accept Codabar before printing a batch.
Check digit computation
EAN-13, EAN-8, UPC-A, and ITF-14 barcodes include a check digit (the last digit) that is computed from the other digits using a weighted sum modulo 10. This tool computes the check digit automatically. Enter only the payload digits to see the digit that will be added. When a full-length EAN, UPC-A, or ITF-14 value is entered, the tool reports whether its final digit is valid. If it is not, the preview uses the corrected code and the status explains the expected digit.
Format selection guide
| Use case | Recommended format | Why |
|---|---|---|
| Retail product sold globally | EAN-13 | International standard; scanned at every POS terminal worldwide |
| Retail product sold in North America | UPC-A | North American retail standard; compatible with EAN-13 readers |
| Small product packaging | EAN-8 | Compact version of EAN-13 for limited label space |
| Internal logistics / warehouse | Code 128 | Encodes full ASCII; compact; most versatile for text and numbers |
| Industrial / healthcare labels | Code 39 | Widely supported by legacy scanners; no special reader configuration needed |
| Shipping cases / logistics units | ITF-14 | Encodes a 14-digit GTIN; verify bearer-bar and print requirements with your partner |
| Library, healthcare, and courier systems | Codabar | Useful for compatible legacy equipment and workflows |
| URLs, contact info, rich data | QR Code (separate tool) | Encodes thousands of characters; 2D format |
Already have a barcode and want to read it? Try the Barcode Scanner. Retail numbers are identifiers as well as patterns of bars; this generator only draws the number you enter and does not assign or register a GTIN. See the GS1 GTIN guidance for retail identifier requirements.
Print specifications
For a barcode to scan reliably, it must meet minimum size and quiet zone requirements:
- EAN-13 nominal size: 37.29 mm wide × 25.93 mm tall (can scale 80%–200% of nominal).
- Quiet zones: The blank space before and after a barcode (left and right) must be at least 10 times the narrowest bar width. Violations cause scan failures.
- Minimum resolution: Print at 300 DPI minimum; 600 DPI recommended for Code 128 at small sizes.
- Contrast: Dark bars on white or light background. Avoid printing on colored labels unless verified with a scanner.
Frequently asked questions
What barcode formats are supported?
Code 128 (full printable ASCII), Code 39, EAN-13, EAN-8, UPC-A, ITF-14 (logistics cartons), and Codabar (legacy library, healthcare, and courier systems).
How are EAN, UPC-A, and ITF-14 check digits handled?
Enter the payload digits and the check digit is added automatically. If you enter a full-length code, the tool reports whether its check digit is valid; an incorrect digit is identified and the preview uses the corrected code.
Can I download an SVG or PNG?
Download SVG for scalable artwork or choose PNG at 1× or 2× resolution. Copy SVG copies the markup for use in HTML and design tools.
What is the difference between Code 128 and Code 39?
Code 128 encodes the full printable ASCII character set and produces a compact barcode. Code 39 is simpler and supported by nearly every scanner, but it has a more limited character set and produces wider barcodes.
Related tools
- QR CodeUse QR Code to generate QR codes for URLs, text, Wi-Fi, vCards,.
- Color ConverterUse Color Converter to pick a color visually or type any format:.
- SVG RasterizerUse SVG Rasterizer to convert SVG files to PNG or JPEG raster.
- Format ConverterUse Format Converter to convert images between JPEG, PNG, WebP, AVIF, and.