Tools Developer Tools Barcode Generator

Barcode Generator: Code 128, Code 39, EAN-13

Developer Tools Active

Turn text or digits into a Code 128, Code 39, or EAN-13 barcode and save it as a PNG image.

Barcode Generator

📊 Barcode Generator

Generate 1D barcodes across standard symbologies including Code 128, Code 39, and EAN-13.

📊 Barcode Tool
Value Encoded
ITEM-987654321
Symbology
Code 128
Status
Generated
Barcode Preview

Rate This Tool

Your feedback helps others discover great tools

–
out of 5
No ratings yet

Tap a star to rate:

About This Tool

Have you ever watched a cashier scan a product and the price pops up at once? That quick read comes from a barcode, a row of bars and spaces that holds a short code. The Barcode Generator turns your own text or numbers into a scannable 1D barcode image.

This tool suits shop owners, warehouse staff, makers, and developers. You type a value, pick a format, and a barcode picture appears. You can then save it as a PNG file for labels or sheets.

Table of Contents

  • What the Barcode Generator Does
  • How to Use It, Step by Step
  • How the Barcode Is Built
  • Worked Example
  • How to Read the Results
  • Picking the Right Format
  • Limitations and Assumptions
  • FAQs About the Barcode Generator

What the Barcode Generator Does

The tool runs fully in your browser using the JsBarcode library. It draws a 1D barcode and lets you save the picture. Everything happens on the page itself.

  • Supports three one dimensional formats: Code 128, Code 39, and EAN-13.
  • Shows a live preview image that redraws as you type.
  • Prints the plain text value under the bars.
  • Offers a Download Barcode Image button that saves a PNG.
  • Displays three cards: Value Encoded, Symbology, and Status.

How to Use It, Step by Step

  1. Type your code in the Barcode Value / Code field. The sample value is ITEM-987654321.
  2. Open the Barcode Format menu. Pick Code 128, Code 39, or EAN-13.
  3. Watch the preview update as you type each character.
  4. Read the Value Encoded card to confirm the final code.
  5. Press Download Barcode Image to save the barcode as a PNG.

How the Barcode Is Built

The tool does not use a price or weight formula. It takes your value, applies the rules of the chosen format, and draws the matching bars. Each format treats your input in its own way.

Your Value+Chosen Format=Barcode PNG
  • Code 128: accepts letters, digits, and common symbols. Your text is encoded just as typed.
  • Code 39: accepts letters, digits, and a few symbols from its own set.
  • EAN-13: keeps only digits and needs at least 12 of them. It uses the first 12 and adds a 13th check digit for you.

A check digit is a math based digit that helps a scanner catch typing errors. The tool works it out from the first 12 digits of an EAN-13 value.

Worked Example

Avery runs a small candle shop. She labels a jar with the text ITEM-987654321 in Code 128. The tool draws the bars and prints the same text below them.

FieldEntryShown Result
Barcode ValueITEM-987654321Encoded as typed
Barcode FormatCode 128Code 128
Value Encoded cardITEM-987654321ITEM-987654321

Next Avery needs a retail code. She switches to EAN-13 and types the 12 digits 400638133393. The tool then adds the check digit by itself.

StepValue
Digits you type400638133393
First 12 digits used400638133393
Check digit added1
Full code encoded4006381333931

The Value Encoded card reads 4006381333931, and the Symbology card reads EAN-13. The bars below match that full 13 digit code exactly.

How to Read the Results

Value Encoded shows the exact code the tool drew. For EAN-13 this is the full 13 digit string, including the added check digit.

Symbology names the format used, such as Code 128, Code 39, or EAN-13.

Status reacts to your input. It reads Generated in green on success. It reads Invalid in red when the value cannot be drawn. It reads Waiting for input in gray when the field is empty.

Preview Image is the real barcode. The Value Encoded card matches this image, so you can trust either one before you print.

Picking the Right Format

Code 128 is a strong default for mixed letters and numbers. It suits internal SKUs, asset tags, and shelf labels, and it stays compact.

Code 39 is an older format that many basic scanners read. It is wider than Code 128 for the same data. Use it when your reader is old or very simple.

EAN-13 is the retail format on grocery and packaged goods. For 2D codes that hold links or contacts, try the QR code maker or the WiFi QR builder instead.

Limitations and Assumptions

  • The menu offers only these three 1D formats. No other symbology is available here.
  • The download is a single PNG at the preview resolution. There is no DPI or format choice.
  • If a value cannot be drawn, the Status card shows Invalid and a short message appears. The image stays blank.
  • Only digits count for EAN-13. Letters and symbols in the field are stripped before the digit check.
  • A blank field draws nothing. The tool shows a prompt and waits for you to type a value.

Need one format only? The site also has a dedicated EAN-13 barcode maker and a focused Code 128 barcode tool. More utilities sit in the developer tools hub.

FAQs About the Barcode Generator

What Happens If My EAN-13 Entry Has Fewer Than 12 Digits?

The tool does not draw a barcode. It sets the Status card to Invalid and shows a message with your digit count. Add digits until you reach at least 12.

Do I Need to Work Out the EAN-13 Check Digit Myself?

No. Type the 12 data digits and the tool adds the 13th for you. If you paste all 13 digits, it recomputes the last one from the first 12.

Why Does My Code 39 Barcode Use Capital Letters?

Code 39 has no lowercase letters in its character set. The tool changes your text to uppercase before it draws the bars.

Can This Tool Make a UPC-A or a QR Code?

No. It offers Code 128, Code 39, and EAN-13 only. For a square 2D code, use the QR code maker linked above.

Can I Change the Barcode Size or Color?

No. The size, margin, and white background are set in the code. There are no controls to resize or recolor the image.

Are These Barcodes Registered for Real Store Use?

No. The numbers are not assigned by GS1 or any retail body. They scan fine but are not tied to a real product.

This calculator gives general estimates only and is not professional advice. Reviewed for general accuracy by Prof. Dr. Khalil Mudassar, PhD.

Category: Developer Tools

You May Also Like

View All