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.

FAQPage 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.
FAQ

Frequently Asked Questions

Generate CODE128, EAN-13, UPC-A, CODE39, and other barcode formats. Customize size and colors. Download as SVG or PNG. Free. Open the tool in your browser on Toolsle.com — free, fast, and no download required.

Embed this tool on your site

Free to use on any website. Copy the code below and paste it into your page. A small “Powered by Toolsle” credit appears inside the embed.

↗ Preview embed · Full tool page

<iframe src="https://www.toolsle.com/embed/barcode-generator" width="100%" height="480" style="border:0;max-width:100%;" loading="lazy" title="Barcode generator — Toolsle"></iframe>