AbraCalc

Barcode Generator

Generate Code-128 barcodes from any text in your browser and download them as PNG. No libraries, no uploads.

Pure browser JavaScript — Code-128 encoder hand-rolled, drawn on a canvas locally.

Embed this tool on your site
Cite this tool

APA

AbraCalc. (2026). Barcode Generator [Online calculator]. Retrieved from https://abracalc.com/app/barcode-generator/

BibTeX

@misc{abracalc-barcode-generator, author = {AbraCalc}, title = {Barcode Generator}, year = {2026}, howpublished = {\url{https://abracalc.com/app/barcode-generator/}} }

Did this tool answer your question?

How to use this tool

  1. Type the text to encode (printable ASCII).
  2. Adjust bar width and height; toggle the human-readable text.
  3. Download the barcode as a PNG.

Generate Code-128 barcodes from any text in your browser and download them as PNG. No libraries, no uploads.

How it works

The Barcode Generator encodes any text string as a Code 128 barcode and renders it as a PNG image you can download. Code 128 is a high-density linear barcode format that can encode the full ASCII character set, making it suitable for product codes, shipment labels, inventory tracking, and document management.

Type or paste the value you want to encode — such as a SKU, serial number, or order ID — and the barcode is generated instantly in your browser. You can then download the PNG and print it on labels, include it in a PDF, or embed it in a document.

The tool calculates the required check digit automatically, so you only need to supply the human-readable data. The barcode image includes a human-readable text label below the bars by default for manual verification.

Because the barcode is generated client-side, it is safe to use for sensitive internal codes such as employee IDs or confidential part numbers.

Worked example

Generate a barcode for a product SKU

  1. Type the product SKU into the input field (e.g. PROD-00123).
  2. The barcode preview updates instantly.
  3. Verify the human-readable text below the bars matches your input.
  4. Click Download PNG.
  5. Print the PNG on a label sheet for attachment to your product.

A scannable Code 128 barcode PNG ready for printing.

Common mistakes to avoid

  • Printing the barcode PNG at too small a size — barcodes need a minimum print size (usually at least 1 inch wide) to scan reliably; always test scan before bulk printing.
  • Including special characters that are outside the printable ASCII range without checking if your scanner supports them.
  • Stretching the barcode image horizontally, which distorts the bar widths and makes it unscannable; always scale proportionally.

Key terms

Code 128
A high-density linear barcode symbology that can encode the full 128-character ASCII set and automatically selects the most compact encoding for the input.
Check digit
A calculated value appended to a barcode to allow scanners to verify that the barcode was read correctly.
Linear barcode
A one-dimensional barcode that encodes data in the widths and spacings of parallel vertical bars.

Frequently asked questions

Which symbology is this?
Code 128, Code Set B, which encodes all printable ASCII characters (space through ~) with a mod-103 checksum, drawn entirely client-side.

References & sources