Tools/Image Tools/Barcode Generator

Barcode Generator Free Online - EAN-13, CODE128

Generate barcodes in formats like CODE128, EAN-13, etc.

About this tool

For internal use - inventory tags, asset labels, scanner or printer testing - any number works, since nobody else needs to recognize it as unique. For retail sale, the barcode number itself (the GTIN) has to be licensed through GS1 or a reseller; printing a self-assigned number on a retail product risks rejection at checkout or by marketplaces like Amazon, which validate GTINs against GS1's records.

This tool doesn't touch that licensing question - it renders the barcode image from the number you provide, whether that number is GS1-licensed or made up for internal use. For EAN-13 and UPC specifically, the check digit is calculated and appended automatically if you leave it off - so a 12-digit EAN-13 value or an 11-digit UPC value becomes a complete, correctly-checksummed barcode.

The generator runs entirely in your browser.

This barcode generator creates CODE128, CODE39, EAN-13, UPC, ITF, MSI, and Pharmacode barcodes, downloadable as PNG or SVG. It's worth knowing upfront: a barcode image and a licensed retail barcode number are two different things - this tool makes the image from whatever value you enter, but doesn't check whether you're licensed to use that number for retail sale.

How to Use Barcode Generator

Enter Value

Write digits or text for the barcode.

Style

Adjust size, color, width, and height.

Preview

Instant preview updates with every change.

Download

Save as PNG or copy the barcode.

Common Workflows

Internal Inventory or Asset Tags

Generate a barcode for internal tracking with any number - no licensing needed since it's not sold at retail.

Scanner or Printer Testing

Generate a quick barcode to confirm a scanner or label printer setup works correctly.

Retail Product Labels (GS1-Licensed)

Once you hold a GS1-licensed GTIN, generate the printable barcode image here.

Auto-Calculated Check Digit

Enter 12 digits for EAN-13 or 11 for UPC and the tool appends the correct check digit automatically.

Print-Ready SVG for Labels

Download as SVG so the barcode stays crisp at any print size.

Best For

  • Generates CODE128, CODE39, EAN-13, UPC, ITF, MSI, and Pharmacode barcodes - download as PNG or SVG.
  • EAN-13 and UPC check digits are calculated automatically - enter the 12 or 11 digits before the check digit and the tool completes it.
  • For retail products, you still need a GS1-licensed number - this tool creates the image, not the license. Internal, inventory, and testing use needs no licensing at all.

Examples

Generate an EAN-13 barcode with an auto-calculated check digit

Barcode Value Entered

590123412345 (12 digits, format set to EAN-13)

Result

A scannable EAN-13 barcode with the 13th check digit calculated and appended automatically

Verified directly in the barcode library's code: EAN-13 and UPC both calculate their own check digit when given the un-checked length. If you instead type a full-length EAN-13 or UPC with an incorrect check digit, the tool won't render a barcode at all rather than producing an invalid, unscannable one.

Use Cases

Tagging internal inventory or fixed assets

Generate a barcode for a warehouse, library, or asset-tracking system where the number just needs to be unique within your own system.

Testing a barcode scanner or label printer

Generate a sample barcode to confirm hardware reads and prints correctly before a real rollout - no licensing concerns apply here.

Producing a retail label from a GS1-licensed number

Once you've obtained a licensed GTIN through GS1 or a reseller, use this tool to generate the actual printable barcode image for packaging.

Common Mistakes

Problem

Printing a self-assigned number on a product meant for retail sale

Solution

This tool doesn't check whether a number is licensed - it just renders whatever you type. A barcode with a made-up EAN-13 or UPC number can get a retail product rejected at checkout or by marketplaces that validate GTINs against GS1's records. Get a licensed number first if the product will be sold at retail.

Problem

Typing a full-length EAN-13 or UPC with a guessed check digit

Solution

If the check digit doesn't match what the format requires, the tool shows nothing rather than an invalid barcode. Enter the value without a check digit (12 digits for EAN-13, 11 for UPC) and let the tool calculate it correctly.

Problem

Expecting a background color option

Solution

Only the bar/line color is adjustable. The background is fixed at white - there's no control to change it.

Problem

Needing several barcodes at once

Solution

This tool generates one barcode at a time - there's no bulk or sequential generation for a range of numbers.

Tips & Best Practices

Let the tool calculate the check digit for EAN-13 or UPC

Enter the value one digit short of the full length (12 for EAN-13, 11 for UPC) rather than guessing the final check digit yourself.

Use SVG for anything that will be printed

SVG output stays sharp at any size, which matters for product labels and packaging. PNG is fine for on-screen or digital use.

Increase the margin for more reliable scanning

The margin field controls the quiet zone around the barcode - a wider margin helps scanners lock onto the code, especially at small print sizes.

Confirm you have a licensed number before printing retail packaging

If the product will be sold through a retailer or marketplace, get a GS1-licensed GTIN before finalizing packaging - generating the image here doesn't establish that license.

Limitations

Does not verify or grant retail licensing

The tool renders a barcode image from whatever number you provide - it has no way to confirm that number is GS1-licensed or safe to use on a retail product.

Background color is fixed at white

Only the bar/line color can be changed. There's no control for the background color.

One barcode at a time

There's no bulk or sequential generation for producing a range of barcode numbers at once.

No multi-barcode label-sheet layout

The output is a single barcode image (PNG or SVG) - not a print-ready sheet of multiple labels.

Comparisons

Barcode Generator vs QR Code Generator

Both create scannable codes, but for different scanning hardware and different data.

Barcode GeneratorQR Code Generator
Best forRetail products, inventory, and logistics - anywhere a barcode scanner is usedLinks, WiFi, or contact info - anywhere a phone camera scans
Data capacityLimited - mostly short numeric or alphanumeric values depending on formatMuch higher - a full URL or block of text
Retail legalityNeeds a GS1-licensed number for genuine retail saleNo licensing body involved - any text or URL works

Which should you use?

Use the Barcode Generator for retail products, inventory, or systems that already expect a barcode. Use the QR Code Generator for anything meant to be scanned with a phone camera, like a link or WiFi network.

FAQs

The most common question is whether these barcodes can go straight onto a retail product - the honest answer depends on whether the number is GS1-licensed, which the FAQ below explains along with how the check digit works.

Do I need to register or license my barcode?

It depends on the use. For internal inventory, asset tags, or scanner testing, any number works with no licensing required. For a barcode that will actually be scanned at retail checkout or listed on a marketplace, the number itself (the GTIN) needs to be licensed through GS1 or a reseller - this tool creates the barcode image from whatever number you enter, but doesn't check or grant that license.

Does the tool calculate the check digit for me?

Yes, for EAN-13 and UPC. Enter the value one digit short of the full length (12 digits for EAN-13, 11 for UPC) and the tool calculates and appends the correct check digit automatically. If you type a full-length code with an incorrect check digit instead, the tool won't render a barcode at all.

Which barcode format should I use?

EAN-13 and UPC are the standard retail formats (EAN-13 internationally, UPC in North America). CODE128 handles longer alphanumeric values and is common in logistics and shipping. CODE39 is a simpler alphanumeric format often used for internal labels. ITF, MSI, and Pharmacode cover more specialized use cases.

Can I change the barcode's background color?

No. Only the bar/line color has a color picker in this tool - the background is fixed at white.

Is the barcode generated on my device?

Yes. CoditTools generates the barcode entirely in your browser using JavaScript. The value you enter is never uploaded to any server.

Can I generate multiple barcodes at once?

No, this tool creates one barcode at a time - there's no bulk or sequential generation for a range of numbers.

Get more tools like this

Leave your email so we can prioritize similar tools and updates.

Trending Tools

Trending tools will appear as visitors explore the catalog.

Recently Used

Your recently visited tools will show up here.