How to Generate Barcodes in Bulk from Excel or CSV

A practical, step-by-step walkthrough for turning a spreadsheet of SKUs or product codes into hundreds of scannable barcode files — including the leading-zero trap that silently corrupts retail barcodes, and how to validate rows before you export.

If you have ever tried to turn a product spreadsheet into barcode images, you already know the painful part is not the barcodes — it is the data. A column of UPC codes silently loses its leading zeros, one row has a letter in a numeric field, and the batch you just exported has forty files that will never scan.

This guide walks through the whole workflow: preparing the sheet, picking the right symbology, mapping columns, validating every row, and exporting files your printer and scanner will both accept.

Why bulk barcode generation breaks in spreadsheets

Spreadsheets treat barcode values as numbers. Barcodes treat them as text. That single mismatch is behind most bulk-generation failures.

When Excel sees 03600029145 it stores 3600029145 — a perfectly valid number, and a broken UPC. Nothing warns you. The cell still looks right in a narrow column, and the damage only becomes visible when a scanner refuses the printed label.

The leading-zero trap

If Excel already stored the value as a number and dropped a leading zero before you upload, no tool can reliably recover it — the digit is simply gone. Fix the column formatting first, then re-enter or re-import the affected values.

Step 1 — Prepare your spreadsheet

Before you generate anything, get the sheet into a shape a generator can read without guessing.

  1. 1Format the barcode column as Text before typing or pasting values. In Excel: select the column → Format Cells → Text.
  2. 2Keep one barcode value per row. Multiple codes in a single cell cannot be split reliably.
  3. 3Add a file_name column if you want control over exported file names rather than defaulting to the code itself.
  4. 4Add a barcode_type column only if your rows genuinely mix symbologies, and only use supported values.
  5. 5Spot-check leading zeros on a handful of rows before uploading anything.

A clean sheet looks like this:

01  barcode_value,file_name,barcode_type
02  SKU-001,sku-001,Code 128
03  400638133393,ean-sample,EAN-13
04  03600029145,upc-sample,UPC-A

Working in Google Sheets?

Format the column as Plain text (Format → Number → Plain text), then either export as CSV or copy the rows straight into a paste box — tab-separated columns can be mapped the same way an uploaded file can.

Skip the setup and try it now

Upload a CSV or Excel file, map one column, and preview every row before exporting.

Step 2 — Choose the right barcode type

Symbology is not a style choice — each type accepts different characters and enforces different rules. Picking the wrong one is the second most common cause of failed batches.

TypeAcceptsBest for
Code 128Letters, numbers, common symbolsSKUs, inventory IDs, serial numbers, warehouse bins
Code 39Uppercase letters, digits, limited symbolsLegacy systems and simple alphanumeric labels
EAN-1312 or 13 digits + check digitInternational retail products
UPC-A11 or 12 digits + check digitNorth American retail and POS
EAN-87 or 8 digits + check digitSmall product labels
ITF-1413 or 14 digits + check digitCartons, cases and shipping packaging

The short version: if the code is internal — a SKU, a bin number, an asset tag — use Code 128. If the code is a retail product identifier you were issued, use the type that matches its digit count.

“Code 128 is the safe default for anything you made up yourself. Retail symbologies are for numbers somebody issued to you.”

— Rule of thumb for picking a symbology

Step 3 — Map your columns

Column mapping is where you tell the generator which column actually holds the value to encode. Only one mapping is genuinely required:

  • ✓Barcode value column — required. The value that gets encoded.
  • ✓File name column — optional. Controls the exported file name.
  • ✓Barcode type column — optional. Only for genuinely mixed batches.
  • ✓Label / text column — optional. Human-readable text printed under the barcode.

Confirm the mapping yourself

A good tool will suggest a mapping from your header row, but you should always confirm it before generating. An auto-guess that picks the wrong column produces a batch that looks fine and encodes the wrong data.

Step 4 — Validate before you export

Validation is the step people skip, and it is the one that saves the print run. Before exporting, every row should be checked against the rules of its symbology:

  • •Digit count matches the type (12 or 13 for EAN-13, 11 or 12 for UPC-A).
  • •Check digit is either valid, or calculated for you from the base digits.
  • •No letters or symbols in a numeric-only type.
  • •No empty rows and no duplicate output file names.
  • •Leading zeros are still intact after import.

Good validation is row-level and non-destructive. You should see exactly which row failed and why — “Row 19 has an invalid check digit” — and fixing one row should never clear the other 499.

Never let a tool silently 'fix' a value

Recalculating a check digit or adding a leading zero changes the encoded number. That should always be an explicit choice you confirm, never something applied automatically in the background.

Step 5 — Export the right format

Different outputs suit different jobs. Choosing badly here is what produces blurry barcodes that scan inconsistently.

FormatUse it forWatch out for
SVGPrint, packaging artwork, anything resized laterNothing — vector is the safest choice
PNGQuick digital use, slide decks, internal docsExport at a high scale factor, not default size
ZIPGetting hundreds of files out at onceCheck for duplicate file names before exporting
PDFPrintable label sheets and thermal labelsMust print at 100% scale, never ‘fit to page’

Prefer SVG whenever the barcode will be printed. It is vector, so it stays sharp at any size. Use high-resolution PNG when you specifically need a raster file, and set the output scale deliberately rather than accepting a default canvas size.

Generate from a spreadsheet in one pass

Paste or upload, validate every row, then export SVG, PNG, ZIP or a PDF label sheet.

Printing labels that actually scan

A barcode that looks perfect on screen can still fail at the scanner. Most print failures come down to four things:

  1. 1Print at 100% scale. “Fit to page” and “shrink oversized pages” change the physical bar widths and break alignment on label sheets.
  2. 2Keep the quiet zone clear. The blank margin either side of a barcode is part of the barcode — crop into it and scanners lose the start and stop patterns.
  3. 3Use high contrast. Black bars on a white background. Coloured or low-contrast barcodes are a common cause of intermittent reads.
  4. 4Test on plain paper first, then scan-test a sample before committing a full sheet of label stock.

Thermal printers need matching dimensions

For 4×6 or 2.25×1.25 thermal labels, the PDF page size must match the label roll size. Printer drivers and label stock vary, so verify your printer’s actual label size rather than assuming a preset matches it.

Five mistakes to avoid

  • ✓Uploading a sheet where Excel already ate the leading zeros. Fix the formatting first.
  • ✓Using a retail symbology for internal codes. EAN-13 will reject your SKU format — use Code 128.
  • ✓Exporting before validating. You will not notice the eighteen broken rows until they are printed.
  • ✓Accepting a default PNG size for print. Set the output scale deliberately, or export SVG.
  • ✓Printing with “fit to page” enabled. It silently rescales every barcode on the sheet.

What a barcode generator cannot do

One boundary worth being clear about: a barcode generator creates the image of a code. It does not create the code itself.

A tool can calculate and validate a check digit, and it can render a scannable image from a value you provide. It cannot issue, register, license or verify official UPC, EAN, GTIN or GS1 numbers. For official retail product identifiers, get your numbers from GS1 or your local GS1 member organization, then use a generator to render the artwork.

The same applies to marketplaces: rendering a valid-looking barcode does not make a product identifier acceptable to a given platform. Requirements vary by marketplace, category and brand, so check the platform’s current product-ID rules before you print anything at volume.

Bulk Barcode Generator Team

We build free, browser-side barcode tools and write about the practical side of getting codes out of spreadsheets and onto labels that scan.

Ready when you are

Turn your spreadsheet into barcodes

Paste your codes or upload a CSV/Excel file, validate every row, and export PNG, SVG, ZIP or print-ready PDF labels — free, with no signup.