How to Create a Barcode for a Product: A Complete Guide

Barcodes are everywhere — on cereal boxes, shipping labels, retail tags, and digital receipts. If you're launching a product, running a small business, or building an inventory system, understanding how to create a barcode isn't just a technical curiosity. It's a practical necessity. Here's how the process actually works, what choices you'll face, and what determines the right path for your situation.

What a Barcode Actually Is

A barcode is a machine-readable representation of data — typically numbers or characters — encoded as a pattern of parallel lines, squares, or dots. A scanner or camera reads that pattern and converts it back into usable data, like a product ID or price.

There are two broad families:

  • 1D barcodes — the classic parallel-line format. Examples include UPC-A, EAN-13, and Code 128.
  • 2D barcodes — grid-based formats that store significantly more data. QR codes and Data Matrix codes are the most common examples.

For retail products sold in stores, UPC (Universal Product Code) and EAN (International Article Number) are the dominant standards. For internal logistics, shipping, or custom applications, formats like Code 128 or Data Matrix are widely used.

Step 1: Decide What Your Barcode Needs to Do

Before generating anything, the most important question is: what system will read this barcode, and what data does it need to contain?

If you're selling through a major retailer or online marketplace like Amazon or Walmart, you'll almost certainly need a GS1-registered barcode — specifically a GTIN (Global Trade Item Number). This is a globally unique number assigned to your product. Retailers use GTINs to manage inventory, prevent duplicates, and sync with supplier databases.

If you're creating barcodes for internal use — warehouse tracking, asset management, or a private app — you have far more flexibility. You can encode any data string you want without needing a globally registered number.

🔑 Key distinction: Retail barcodes for external commerce require GS1 registration. Internal barcodes don't.

Step 2: Get a GS1 Number (If Required)

GS1 is the international standards body that issues unique company prefixes and GTINs. When you register with GS1, you receive a Company Prefix — a numeric string that identifies your business. You then append product-specific digits to create individual GTINs for each item you sell.

The process involves:

  1. Applying through GS1 (either your national GS1 organization or GS1 US, depending on your location)
  2. Paying an annual membership fee, which scales with the number of GTINs you need
  3. Receiving your company prefix
  4. Assigning individual product numbers within that prefix

Some third-party resellers sell individual GTINs at lower cost, but major retailers increasingly require barcodes issued directly through GS1. Whether a reseller barcode is acceptable depends entirely on where you plan to sell.

Step 3: Generate the Barcode Image

Once you have your number, you need to convert it into a scannable barcode graphic. This is done with barcode generator software or online tools.

Common options fall into a few categories:

TypeExamplesBest For
Online generatorsBarcode.tec-it.com, Online Barcode GeneratorQuick one-off labels
Desktop softwareBarTender, NiceLabel, Zebra DesignerHigh-volume label printing
Developer librariesZXing (Java), python-barcode, bwip-jsCustom apps and integrations
E-commerce platformsShopify, WooCommerce (via plugins)Stores that auto-assign SKUs

For UPC-A or EAN-13 barcodes, the generator will take your 12- or 13-digit number and produce a standard-width linear barcode image. You'll typically export it as a vector file (SVG or EPS) for print use, or a high-resolution PNG/TIFF if vector isn't available. Vector is strongly preferred for packaging — it scales without losing quality.

Step 4: Follow Print Specifications

A barcode that looks right on screen can still fail to scan if printed incorrectly. There are established standards for this.

Critical print factors:

  • Size — UPC-A has a nominal size of 1.469" × 1.02". Scaling is permitted within a defined range (typically 80%–200% of nominal size).
  • Quiet zones — the blank margins on either side of the barcode. Scanners need this space to detect where the barcode begins and ends.
  • Color contrast — dark bars on a light background. Black on white is safest. Avoid printing on metallic surfaces or using low-contrast color combinations without testing first.
  • Resolution — for thermal or inkjet printing, 300 DPI minimum; 600 DPI or higher is recommended for offset printing on packaging.

GS1 publishes detailed print quality guidelines. If your product is going to retail, it's worth reviewing the GS1 General Specifications document for your barcode type.

Step 5: Test Before You Commit 🧪

Before printing thousands of labels or finalizing packaging, verify that your barcode scans correctly. Use:

  • A handheld barcode scanner (USB or Bluetooth)
  • A smartphone barcode scanning app (many free options exist)
  • A barcode verification device — a calibrated tool that grades scan quality to ISO/IEC standards, used when retail compliance is required

Scan the barcode in different lighting conditions and at various distances. If it decodes consistently and returns the correct data, your setup is solid.

The Variables That Shape Your Approach

How you create a barcode — and how complex the process gets — depends heavily on several factors:

  • Sales channel: Major retailers require GS1-registered GTINs; internal systems don't.
  • Volume: One product vs. hundreds changes whether a free online tool or dedicated label software makes more sense.
  • Integration needs: If your barcode needs to sync with inventory management software, point-of-sale systems, or an ERP, the format and generation method may be dictated by that system.
  • Print method: Digital printing, thermal transfer, offset printing, and direct-to-packaging each have different resolution and format requirements.
  • Product type: Some product categories (pharmaceuticals, fresh food, variable-weight items) use specialized barcode formats with additional data fields.

A solo maker selling handmade goods through their own website has a very different path than a manufacturer supplying a national grocery chain. Both use barcodes. The underlying standards are the same — but the compliance requirements, registration obligations, and technical complexity differ considerably depending on where and how the product moves through commerce.