QR Code & Barcode Guides

The Complete Barcode Generation Guide: Tools, Formats, and Best Practices

A practical barcode generator guide for business: barcode formats, types of barcodes, 1D vs 2D barcodes, how to generate UPC and Code 128 barcodes, and printing best practices for labels.

Table of Contents

If you run a business, barcodes stop being “just lines” quickly. The moment you print labels for products, shelves, bins, invoices, or shipping, you need a repeatable process. That process includes choosing the right barcode format, generating the barcode correctly, printing at the right size, and testing with the scanners your team actually uses.

This is the complete barcode generation guide. It is written for people who want an honest, practical reference: which barcode formats exist, the difference between 1D and 2D barcode systems, what tools you can use, and the barcode best practices that prevent scan failures. If you are searching for a barcode generator or a free online barcode generator for small business, this guide helps you choose the right workflow and avoid common mistakes.

What this guide covers

A barcode system is not only about creating an image. It is about data and process. This guide covers:

  • What barcodes are and how scanners read them
  • The difference between 1D and 2D barcode formats
  • Common barcode formats (Code 128, Code 39, UPC/EAN, and more)
  • Tools: an online barcode generator vs barcode software vs label workflows
  • How to generate the barcode step-by-step (including Code 128 and UPC/EAN notes)
  • Barcode design online rules: quiet zones, size, contrast, placement
  • Printing tips and troubleshooting so labels scan the first time
  • When QR codes (2D) are a better choice and the different types of QR codes

If you already know your format and just need to create an image, you can use our online barcode generator. The rest of this guide explains how to do it in a way that holds up in real operations.

What is a barcode?

A barcode is a machine-readable representation of data. In a 1D barcode, the data is represented by bars and spaces along one line. In a 2D barcode, the data is represented in a grid. Scanners read the pattern, decode it, and output a value (numbers, letters, or a structured payload).

In business, the barcode usually represents an identifier. That identifier then maps to a record in your system: a product SKU, a shipment number, an asset ID, or an inventory location. The barcode is not the database. It is the input method.

This is why accuracy matters. If a barcode scans to the wrong value, you do not get a “minor” error. You get a wrong item picked, a wrong shipment, a wrong stock count, or a wrong checkout entry. A good barcode generator workflow focuses on preventing those issues.

1D vs 2D barcodes (difference and use cases)

The easiest way to understand the 1D vs 2D barcodes question is to think about what you need to store and how fast you need to scan.

1D barcodes (linear)

1D barcodes are the classic “lines” you see on retail products. They are optimized for speed and are widely supported by laser scanners and point-of-sale systems. Most 1D codes store a short identifier. Examples include Code 128, Code 39, ITF, UPC, and EAN.

Use 1D barcodes when:

  • You need fast scanning at checkout or in a warehouse
  • Your scanners are primarily laser-based 1D scanners
  • You only need to encode a short ID (SKU, order ID, bin ID)

2D barcodes (matrix)

2D barcodes store more data in a grid and are commonly scanned by camera-based scanners or phone cameras. QR codes are the most popular 2D barcode for consumer use. Data Matrix and PDF417 are common in industrial and compliance workflows.

Use 2D barcodes when:

  • You need to store more data (or a URL) in the barcode itself
  • You want consumers to scan with phones (menus, support pages, payments)
  • You want error correction so codes can scan even if partially damaged

The “best” choice depends on your workflow. Many businesses use both: 1D barcodes for internal scanning and 2D QR codes for customer-facing actions. That is why this guide includes a section on different types of QR codes as well.

Types of barcodes and common formats

“Types of barcodes” can mean two things: the symbology (Code 128 vs UPC vs QR) and the usage standard (retail vs internal IDs). Below are the most common formats you will see.

Code 128 (high-density 1D barcode)

Code 128 is one of the most widely used 1D barcodes for logistics and internal tracking. It supports numbers and letters and packs data densely, which helps when label width is limited. People sometimes search for “barcode generator 128 code” when they need Code 128 labels for shipping, bins, or order IDs.

Use Code 128 when you need:

  • Alphanumeric IDs (like ORD-10482)
  • Compact labels for internal scanning
  • Broad scanner compatibility in warehouses

If you want a full deep dive, see our Code 128 guide: Code 128 Barcode Generator - Complete Guide.

Code 39 (simple alphanumeric 1D barcode)

Code 39 is a simpler alphanumeric barcode that is easy to print and scan, but it is less dense than Code 128. It is common in asset tracking and in older systems. If you have long IDs and limited label width, Code 39 can become wide quickly.

Use Code 39 when:

  • Your system or scanner specifically requires it
  • You want a simple format for short IDs

UPC and EAN (retail product barcodes)

UPC and EAN barcodes are used for retail products. They are standardized formats designed to identify products at checkout. The barcode image is only part of the story. The number must be assigned correctly in the retail ecosystem.

If you are asking “how do I generate upc barcode?” there are two steps:

  1. Obtain a valid UPC/EAN number through the proper channel for your market (often via GS1, depending on your needs).
  2. Generate the barcode image from that number and print it with the right size and quiet zones.

A barcode generator can create the image, but it cannot guarantee your number is valid or globally unique. If you sell online only and do not need retail scanning, you may not need UPC at all. If you sell in retail channels, verify requirements with your distributor.

ITF / Interleaved 2 of 5 (logistics cartons)

ITF is used in some logistics contexts, especially when printing on corrugated cardboard. It can be more tolerant of lower print quality, but it is numeric-only. If your workflow requires ITF, confirm the exact variant and length rules with your partner or carrier.

2D barcodes: QR, Data Matrix, PDF417

QR codes are the most common 2D code for consumer scanning. Data Matrix is common in manufacturing and medical contexts. PDF417 is used for IDs and boarding passes in some regions. These formats can store more data and often include error correction.

2D barcodes are not automatically “better.” They are better when you need more data or a phone-scannable workflow. For example, a QR code that opens a product setup page is more useful for customers than a 1D barcode that only stores an internal ID.

Tools: online generators, software, and label workflows

There are three common approaches to barcode creation. The right choice depends on scale and how often you generate labels.

Option A: online barcode generator

An online barcode generator is a fast way to create barcodes without installing software. It is ideal when you need to generate a small batch of labels or you are still validating your workflow.

Pros:

  • Fast setup
  • Easy exports (PNG/SVG)
  • Works for occasional use

Cons:

  • Batch workflows may be manual
  • You must manage your data source carefully

If you want a quick start, use our free online barcode generator and choose your barcode format, enter the value, then download a print-friendly file.

Option B: barcode software

Barcode software is useful when you need templates, database integration, and repeatable printing. It can also help with compliance formats and label layouts. If you print labels daily at scale, software can reduce errors.

The risk is overbuying. Many small businesses do not need heavy barcode software at the start. You can do a lot with a simple generator plus a consistent label template and good printing practices.

Option C: label generator workflows (spreadsheets + templates)

Many teams use a spreadsheet as the source of truth and a label template system for printing. The workflow looks like:

  1. Define an ID format (SKU, bin ID, asset ID)
  2. Store IDs in a spreadsheet or database
  3. Generate barcode images (online tool or software)
  4. Place images into a label template and print at 100% scale
  5. Scan test a few labels from each batch

The key is consistency. The worst barcode workflows are the ones that change format every week. Pick a standard and keep it. That is one of the most important barcode best practices.

How to generate the barcode (step-by-step)

The exact steps depend on your format, but the overall process is the same. You choose a symbology, encode the right value, export a high-quality image, and print it correctly.

Example: generate a Code 128 barcode online

Code 128 is a common choice for internal IDs. Here is a repeatable workflow.

  1. Decide your ID format. Example: INV-2026-000482.
  2. Open our barcode generator.
  3. Select Code 128 (this is the “barcode generator 128 code” option).
  4. Enter your ID exactly (including dashes if your system expects them).
  5. Download SVG for print, or PNG if you are using it digitally.
  6. Print a proof at 100% scale and scan it with your scanner.

If you need to generate many labels, do not manually type IDs into the tool one by one. Use a data source (spreadsheet) and a consistent pattern. Manual typing is where most barcode errors start.

Screenshot placeholder: selecting Code 128 and generating a barcode
Tip: print at 100% and keep quiet zones. Avoid “fit to page” scaling.

Example: how do I generate UPC barcode?

The most common UPC format is UPC-A (12 digits). Many tools can render the barcode if you provide a valid number, but you must handle the number correctly.

  1. Confirm you have a valid UPC number for the product. If you do not, stop and determine how you will assign it.
  2. Enter the digits exactly. Do not add spaces.
  3. Generate the barcode image.
  4. Print at the recommended size range for your packaging and test with a retail scanner if possible.

Important: many UPC/EAN systems include a check digit. Some generators calculate it if you provide the base digits. Others expect the full number. Read the tool’s expectation and verify with a scan test. For retail packaging, this is a place where mistakes are expensive.

Barcode design online: sizing, quiet zones, and layout

Barcode design online has a few hard rules. If you violate them, scanning will fail no matter how good your generator is.

Quiet zones are not optional

Barcodes require quiet zones (blank margins) on the left and right (and often above/below depending on format and layout). Scanners need clear space to detect the start and end of the barcode. If your design crops too tightly, scanning fails.

Size and aspect ratio

Do not stretch barcodes. Keep the aspect ratio consistent. If you resize, resize proportionally. Also avoid making a barcode extremely short in height. Height helps scanning because it gives the scanner more chance to read a clean line.

Human-readable text

Many barcodes include human-readable text under the bars. This is helpful when scanning fails or when a person needs to type the value. Keep it readable, and ensure it matches the encoded value.

Background and contrast

Use dark bars on a light background. Avoid printing barcodes on patterns, glossy photos, or colored gradients. If you must place a barcode on a colored label, keep a solid white box behind it.

Barcode best practices for printing and labels

Printing is where many “online barcode” workflows fail. The barcode image may be correct, but printing introduces blur, scaling, or low contrast. Use these barcode best practices:

  • Prefer SVG/PDF for print: vector files keep edges crisp.
  • Print at 100%: avoid scaling options like “fit to page.”
  • Use sufficient DPI: if you must use raster images, ensure print resolution is high.
  • Choose the right label material: glossy labels can cause glare; low-quality paper can bleed ink.
  • Keep barcodes flat: avoid placing them over curves, folds, or corners.

If you are printing product labels, do not forget the full label design. A good label includes:

  • A clear product name (for humans)
  • A SKU or identifier (for systems)
  • The barcode with enough quiet zone (for scanners)
  • Optional: a QR code for customer support or product info (for phones)

Keep the barcode away from the label edge. Edges get worn, curled, and scratched. If you place the barcode too close to the edge, scanning failures increase over time. If the label will be exposed to moisture or abrasion, choose a material that matches the environment.

A simple but important rule: do not place a barcode on a seam or across a fold. If the bars are distorted, even slightly, scanners may fail or misread. For bottles and curved packaging, place the barcode on the flattest section you have.

If your workflow involves shipping labels, remember that carriers often have their own requirements. If a partner specifies a label standard, follow it. A barcode generator can create the image, but compliance and placement are what make it scannable in the chain.

If you are printing shipping labels, test with your carrier’s scanner environment. If you are printing product labels, test with your point-of-sale scanner. Different scanners behave differently. A barcode that scans in your phone camera app is not a valid test for a 1D retail workflow.

If you need a label workflow, document a standard. Example: “Code 128, width X, height Y, margins Z, print at 100%, matte labels.” Consistency reduces scan problems.

Scan testing and troubleshooting

A barcode workflow is not complete until you scan test. Use a simple checklist:

  1. Scan the code with the intended scanner (not only a phone).
  2. Confirm the decoded value matches your system exactly.
  3. Test under normal lighting and with typical scanning speed.
  4. Test a printed proof, not only a screen preview.

Common problems and fixes:

  • It does not scan at all: check quiet zones, contrast, and whether the correct symbology was chosen.
  • It scans sometimes: increase size/height, use better print quality, and avoid glossy glare.
  • It scans to the wrong value: confirm the input value and ensure your system expects the same characters.
  • It worked before and stopped: labels may be worn, scratched, or dirty. Replace and re-test.

If you are building a system for staff, add a “fallback” plan: human-readable text, or a manual search in the POS/inventory system. Barcodes are a tool, not a single point of failure.

Scanner types: what your hardware supports

One reason teams get stuck is scanner mismatch. A 1D laser scanner reads linear codes well but may not read 2D codes like QR or Data Matrix. A camera-based imager can read both 1D and 2D codes, but it may behave differently on glossy surfaces and small prints.

Before you standardize your labels, confirm what scanners you use:

  • POS scanner: usually optimized for UPC/EAN, sometimes supports Code 128 and QR depending on model.
  • Warehouse handheld: often supports Code 128, Code 39, and sometimes 2D.
  • Phone camera: great for QR codes, not ideal for 1D retail scanning workflows.

If you are planning a new process, it is often worth buying a 2D imager for flexibility. But if you already have 1D-only hardware, keep your operations barcode formats in the 1D family and reserve 2D for customer-facing QR codes.

When to use QR codes instead (and different types of QR codes)

QR codes are 2D barcodes that are great for consumer workflows. If you need the barcode to open a website, show a menu, join Wi-Fi, or start a chat, use a QR code. If you need high-speed scanning for operations, use 1D barcodes like Code 128 or UPC/EAN.

People sometimes confuse “barcodes” and “QR codes,” but they can work together. For example:

  • Product packaging can include a UPC (for checkout) and a QR (for support, instructions, or warranty).
  • Warehouse bins can have a Code 128 (for scanning) and a QR that opens an internal checklist page.

If you are exploring the different types of QR codes, common categories include:

  • URL QR codes (open a website)
  • Text QR codes (show a message)
  • Wi-Fi QR codes (join a network)
  • vCard/contact QR codes (save a contact)
  • Payment QR codes (open a payment flow)

If you want to create QR codes, use our free QR code generator and follow print best practices like quiet zone, high contrast, and scan testing.

FAQs

Which barcode format should I use?

Use Code 128 for internal IDs and logistics labels when you need alphanumeric support. Use UPC/EAN for retail products when required by your sales channel. Use QR codes when you need consumers to scan with phones or you need to encode a URL.

Is an online barcode generator good enough for a business?

Often yes, especially for small businesses. The key is using consistent formats and printing correctly. If you are printing labels daily at scale or need database integration, barcode software may help. Many teams start with an online tool and upgrade later.

Do I need UPC for my product?

Not always. If you sell in retail channels or through distributors that require UPC/EAN, you may need it. If you sell direct-to-consumer online, you may be able to use internal SKUs. Check the requirements of where you sell.

What is the biggest printing mistake?

Cropping too tightly and removing quiet zones, or scaling the barcode with “fit to page.” Print at 100% and keep margins.

What is the difference between 1D and 2D barcode?

1D barcodes store data along one line and are optimized for fast scanning. 2D barcodes store data in a grid and can hold more data and often include error correction. QR codes are a common 2D barcode for consumer scanning.

Want to generate labels now? Use our free online barcode generator to create Code 128, UPC/EAN (if you have valid numbers), and other formats, then print a proof and scan test before you roll out a full batch.

Explore More

If you find these tools helpful, consider supporting the project!

Support Us