Barcode Generator

Create Code 128 B, EAN-13 or UPC-A barcodes with checked data, PNG export and a Three.js preview.

  • File & Data
  • Runs in your browser
  • Free, no signup

How to use

How to Use Barcode Generator

  1. 1

    Enter your data

    Type the text, URL, or number to encode as a barcode.

  2. 2

    Select barcode format

    Choose from Code 128, EAN-13, UPC-A, or other barcode types.

  3. 3

    Download the barcode

    Save the generated barcode as a PNG or SVG image file.

Add barcode to PDF

The guide

Tested tool guide Tested browser tools Checked November 30, 2026

What Barcode Generator does, with a checked example

Choose one of three barcode formats and enter the value you want to encode. Inspect the check result and the bars, size the modules and height, and download a flat PNG for scanning.

Worked example

A concrete input and expected output from the current implementation.

Input

Choose EAN-13 and enter 400638133393.

Expected output

The tool displays 4006381333931 with check digit 1 and a barcode with its quiet spaces.

Alternating digit weights contribute to a total that is rounded up to a multiple of ten by the final digit.

How the result is produced

1

Choose the data format

Code 128 B accepts printable ASCII. EAN-13 takes twelve digits and UPC-A takes eleven, or enter a complete value with a final digit to verify.

2

Check and render the barcode

Retail barcode checks use the modulus-ten retail weights. Code 128 uses a weighted symbol sum modulo 103. The preview includes format-specific quiet spaces beside the black bars.

3

Save a scan-ready preview

Adjust module width and bar height. Use the flat PNG for scanning, and use the Three.js display to compare the texture with the encoded value and checksum.

Good uses

  • Make a barcode proof for a label design.
  • Verify a typed retail check digit.
  • Render a Code 128 image for an inventory workflow.

Limits and checks

  • Check that the printed size and quiet zones suit your actual scanner and label needs.
  • Verify that a retail number belongs to your product before using it.
  • Bar thickness depends on pixel width and physical resolution when printed.

Common questions

Can I enter the full number with its check digit?

Yes. For EAN-13 and UPC-A, the tool verifies a supplied final digit or appends one when you provide only the data digits.

Which preview should I scan?

Use the flat image or exported PNG to avoid perspective and screen scaling in the Three.js view.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.