ToolsleAll tools →
Design Tools

Barcode Generator

Generate CODE128, EAN-13, UPC-A, CODE39, and other barcode formats. Customize size and colors. Download as SVG or PNG. Free.

WebApplication SchemaFAQPage Schema
Barcode Generator — Free Online Tool
InstantFreeNo signup

CODE128

Any non-empty text (library picks CODE A/B/C automatically)

Character set: All ASCII characters supported

13 characters

Enter a valid value to preview the barcode.

Type: CODE128

Encoded: TOOLSLE-12345

Customization

Height presets:

Download & export

Batch generate (max 50)
Recent barcodes (0)

    Barcode Generator — Create Any Barcode Format Free

    Our free barcode generator supports all major linear barcode formats including CODE128, EAN-13, EAN-8, UPC-A, UPC-E, CODE39, CODE93, ITF-14, Codabar, and more. Enter your data, choose your format, customize the appearance, and download as a high-quality SVG or PNG file. No signup, no watermarks.

    Barcode Formats Reference

    FormatData TypeLengthCommon Use CasesCheck Digit?
    CODE128All ASCII charactersVariableShipping, inventory, general purposeYes (auto)
    CODE39A–Z, 0–9, 8 symbolsVariableAutomotive, healthcare, defenseOptional
    CODE93A–Z, 0–9, specialVariableComplement to CODE39Yes (auto)
    EAN-13Digits only13 digitsRetail products worldwideYes (last digit)
    EAN-8Digits only8 digitsSmall retail productsYes (last digit)
    UPC-ADigits only12 digitsRetail products (North America)Yes (last digit)
    UPC-EDigits only8 digitsSmall packages (North America)Yes (auto)
    ITF-14Digits only (pairs)14 digitsShipping cartons, GS1Yes (last digit)
    CodabarDigits + 6 symbolsVariableLibraries, blood banks, FedExOptional
    MSIDigits onlyVariableRetail shelving, inventoryOptional

    Choosing the Right Barcode Format

    Your Use CaseRecommended FormatWhy
    General inventory / internalCODE128Most flexible, supports any text and numbers
    Retail product (worldwide)EAN-13International standard for consumer goods
    Retail product (US only)UPC-ANorth American retail standard
    Small retail productEAN-8Compact version for small packaging
    Shipping cartonITF-14GS1 standard for outer packaging
    Library booksCodabar or CODE39Traditional library formats
    Healthcare / pharmaceuticalsCODE128 or PharmacodeHigh-density, flexible
    Industrial / automotiveCODE39Simple, widely supported in industry
    US mail / postalIntelligent Mail (IMb)USPS official format

    EAN-13 Barcode Structure

    EAN-13 is the most common retail barcode worldwide. Understanding its structure helps you generate valid codes:

    DigitsPositionMeaning
    1–31–3GS1 company prefix (country + company)
    4–124–12Product reference (company assigned)
    1313Check digit (calculated automatically)
    000–0991–3USA and Canada (UPC compatible)
    300–3791–3France
    400–4401–3Germany
    450–4591–3Japan
    690–6991–3China
    978–9791–3Books (ISBN)
    9771–3Periodicals (ISSN)

    Barcode Size and Print Specifications

    SpecificationMinimumNominalMaximum
    Bar width (X dimension)0.264mm0.33mm0.66mm
    EAN-13 total width29.83mm37.29mm74.58mm
    EAN-13 total height22.85mm25.93mm51.86mm
    Quiet zone (each side)3mm3.63mm
    Print resolution150 DPI300 DPI600 DPI+
    Ink spread tolerance±0.05mm±0.10mm

    Barcode Colors and Contrast Requirements

    Barcode scanners typically use red laser or LED light. The barcode must absorb the light (dark bars) while the spaces reflect it (light areas). Standard black on white provides optimal contrast:

    Color CombinationScannable?Notes
    Black bars on whiteExcellentStandard, always works
    Dark blue on whiteGoodBlue absorbs red laser
    Dark green on whiteGoodGreen absorbs red laser
    Dark brown on whiteGoodBrown absorbs red laser
    Red on whitePoorRed reflects red laser — avoid
    Red on greenNoSimilar reflectance issues
    Any on blackNoNo contrast for scanner
    White bars on blackSometimesInverse — test thoroughly

    How Barcode Scanning Works

    A barcode scanner works by shining a light (typically a red laser or LED) across the barcode and measuring the reflected light. Dark bars absorb the light; light spaces reflect it. This creates a pattern of electrical pulses that the scanner decodes into the original data.

    Modern smartphone cameras scan barcodes using image processing software that analyzes the contrast pattern in the camera feed. Many browsers and apps can decode common formats when you point the camera at a printed or on-screen code.

    GS1 Standards and Official Barcodes

    For official retail product barcodes (EAN-13, UPC-A), the numbers must be registered with GS1 — the international organization that manages product identification standards. A GS1 company prefix guarantees your barcode numbers are globally unique and won't conflict with other products.

    • For internal use— You can use any numbers you choose for internal inventory systems. The numbers don't need to be GS1-registered for internal tracking.
    • For retail sale — If you plan to sell products in retail stores or online marketplaces, obtain a GS1 company prefix from gs1.org to get legitimately assigned barcodes.
    • For books and publications — ISBNs are encoded as EAN-13 barcodes with the 978 or 979 prefix. ISBNs are assigned by national ISBN agencies.

    Frequently Asked Questions

    Can I generate EAN-13 barcodes for free products?

    You can generate a technically valid EAN-13 barcode image for free here. However, for products sold in retail stores or listed on major e-commerce platforms like Amazon, you need a GS1-registered number. Using unregistered numbers risks conflicts with other companies' products and may violate retailer policies.

    What is the best barcode format for inventory?

    CODE128 is the best choice for internal inventory systems — it supports all letters, numbers, and symbols, has no length restrictions, and is widely supported by all barcode scanners. For inventory that will be sold at retail, use EAN-13 or UPC-A with registered GS1 numbers.

    How do I scan a barcode with my phone?

    On iPhone (iOS 11+): open the built-in Camera app and point at the barcode — a notification appears with the decoded content. On Android (9+): Google Lens (built into most camera apps) detects barcodes automatically. Older devices may need a dedicated barcode scanner app from the app store.

    How small can a barcode be and still scan?

    The minimum reliable size depends on the format and scanner. For handheld retail scanners, the minimum bar width (X dimension) is approximately 0.264mm. A full EAN-13 barcode at minimum size is about 29.83mm wide × 22.85mm tall. Mobile phone cameras can generally scan barcodes as small as 15–20mm wide in good lighting conditions.

    What is the difference between a barcode and a QR code?

    Traditional (linear/1D) barcodes encode data in one dimension — a series of parallel bars read by horizontal scanning. They typically store tens of characters. QR codes are 2D barcodes that encode data in both dimensions, storing much more data. QR codes are versatile for consumer applications, while 1D barcodes remain standard in retail and logistics due to simplicity and fast scanning.

    More tools: Color Picker, Image Resizer.