HandyTools Hub

← All guides

Barcodes Explained: Code 128, EAN-13, and Beyond

2026-09-03

The black-and-white stripes on the back of every product, shipping label, and ticket are one of the most underrated pieces of technology. You scan them at the checkout without a second thought, but underneath is a clever encoding system that let businesses track inventory for decades.

This guide explains what barcodes are, the difference between 1D and 2D codes, the most common types, and how to generate your own barcode.

1D barcodes vs. QR codes

“Barcode” usually means a 1D barcode — the familiar vertical stripes. It stores data in a single horizontal line, decoded by reading the width of each stripe and gap. It typically holds a short number, like a product ID.

A QR code is a 2D code. It stores data in a two-dimensional grid, so it can hold far more — URLs, text, contact info — and it can be scanned from any angle. QR codes are the modern, data-rich cousin.

The two are different tools. If you just need to identify something with a short, scannable number — like a product — a 1D barcode is standard and cheap to print. If you need to carry a URL or a chunk of data, a QR code is the way to go.

The common barcode types

There are many 1D barcode standards, each suited to a purpose:

  • Code 128 — the most versatile. It encodes the full ASCII character set, so it can hold letters, numbers, and symbols. Used in shipping, inventory, and labeling.
  • EAN-13 — the standard retail barcode: the 13-digit sequence you see on products in stores.
  • UPC — the earlier 12-digit North American store code, now largely folded into EAN-13.
  • Code 39 — an older alphanumeric code, simple and still used in industry.

If you’re generating a barcode for a product or label, the type depends on where it’ll be scanned. Retail runs on EAN-13; logistics and general use favor Code 128.

What a barcode holds

A barcode is just a scannable encoding of a short string. Unlike a QR code, it’s not usually a URL — it’s an identifier: a product number, a serial, a tracking number, a shelf location. The value has to be short, because a 1D code can only hold so much before it becomes physically too wide to scan reliably.

This is why barcodes and QR codes solve different problems. A barcode tells a scanner what something is — a way to look it up in a database. A QR code can carry the answer itself, like a Wi-Fi password or a website link.

Generating a barcode

To make a barcode, you give the tool a text value and a barcode type. It renders the correct pattern of stripes and gaps so that a scanner reading the widths can reconstruct your value. A good generator:

  • Supports the common types, so you can match the use case.
  • Renders cleanly at the size you need for printing.
  • Swaps quickly to a QR code if you’d rather carry more data.

The output is a printable image you can drop onto a product label, package, or document.

Quick Reference

  • A 1D barcode codes a short identifier in vertical stripes; a QR code is a 2D code that carries more.
  • Code 128 holds the full ASCII set and is the general/logistics workhorse.
  • EAN-13 and UPC are the retail store codes on products.
  • A barcode identifies something; a QR code can carry the answer itself.
  • Pick the type by where it’ll be scanned — retail runs on EAN-13, general use favors Code 128.

Getting started

If you need a barcode for a product, a package, or a label, the Barcode Generator produces a clean Code 128 or EAN-13 image right in your browser. And when what you actually need to carry is a link or a block of text rather than a short identifier, the QR Code Generator is the tool to reach for.