How to Generate and Scan Barcodes in Google Sheets (Step-by-Step)

Google sheet shortcut(prosheethub)

Whether you manage warehouse inventory, track asset tags, print product labels, or organize event ticketing, barcodes are essential for fast, error-free data entry. Retyping long 12-digit SKUs or serial numbers manually is slow and invites costly typos.

Google Sheets makes it remarkably easy to turn raw SKU numbers into scannable barcodes—completely free. This step-by-step guide covers two proven methods to generate scannable barcodes in Google Sheets (using Google Fonts and dynamic image APIs) and explains how to scan them directly into your spreadsheet using a mobile phone or physical barcode scanner.


Method 1: Generate Barcodes using Google Barcode Fonts (Fastest)

The simplest way to create barcodes in Google Sheets is by applying a special barcode font to your text or numbers. Google Sheets natively supports Libre Barcode 39 and Libre Barcode 128 from Google Fonts.

Step 1: Format Code 39 with Start/Stop Asterisks

Code 39 barcodes require a start and stop character (an asterisk *) at the beginning and end of the text string so barcode scanners can recognize where the code starts and stops.

If your raw product SKU is in cell A2, enter this formula in cell B2:

="*" & A2 & "*"

Step 2: Apply the Barcode Font

  1. Highlight your formula column (e.g., cell B2).
  2. Click the Font dropdown menu in the top toolbar.
  3. Click More fonts at the top of the menu.
  4. In the search box, type Libre Barcode.
  5. Select Libre Barcode 39 or Libre Barcode 128 and click OK.
  6. Increase the font size (e.g., 32pt to 48pt) so the bars are crisp and wide enough for scanners to read.
When to use Code 39 vs Code 128: Use Code 39 for basic alphanumeric SKUs (letters and numbers). Use Code 128 if you need high-density barcodes that accommodate larger datasets or special characters in a smaller physical width.

Method 2: Generate Crisp Barcode Images (IMAGE + API)

If you prefer clean barcode graphics that display identically across all devices—even on computers that don't have the font loaded—you can generate dynamic barcode images using Google Sheets' IMAGE function and an open-source barcode generator API (like QuickChart).

Formula Example (Code 128 Image):

In cell B2, enter the following formula:

=IMAGE("https://quickchart.io/barcode?type=code128&text=" & ENCODEURL(A2) & "&includeText=true")

Formula Parameter Breakdown:

  • type=code128: Specifies the barcode symbology (e.g., code39, code128, ean13, or qr).
  • ENCODEURL(A2): Safely formats special characters or spaces inside cell A2 for web transmission.
  • includeText=true: Displays the human-readable text label underneath the barcode lines.

How to Scan Barcodes Directly into Google Sheets

Generating barcodes is only half the workflow; reading them back into Google Sheets instantly automates your inventory logs, attendance lists, or order verification forms.

Option 1: Hardware USB or Bluetooth Barcode Scanner (Desktop)

Handheld USB or Bluetooth barcode scanners operate as standard human interface input devices (HID)—meaning your computer sees them as high-speed keyboards.

  1. Connect your barcode scanner to your computer via USB or Bluetooth.
  2. Open your Google Sheet and click on the target cell where you want to record the scanned SKU.
  3. Pull the trigger on your hardware scanner targeting a printed barcode.
  4. The scanner will automatically read the barcode, type the character string into the active cell, and issue an Enter command to move down to the next row.

Option 2: Mobile Smartphone Camera (Blogger/Mobile App)

If you are managing inventory on the shop floor without a dedicated hardware scanner, you can scan barcodes using your smartphone camera:

  • Google Sheets Mobile App (Android & iOS): Open the Google Sheets app, select a cell, open the formula/text bar, and tap the Camera / Scan icon to scan physical barcodes directly into cells.
  • Google App Sheet Integration: Convert your Google Sheet into a free AppSheet mobile application with built-in camera barcode scanning fields for mobile teams.

Comparison: Barcode Fonts vs. Barcode IMAGE Formula

Feature Barcode Fonts (Libre) IMAGE API Formula
Setup Speed Instant (Change font) Requires URL formula
Offline Availability Yes (Works without internet) No (Requires active web connection)
Visual Quality Scales with font size Sharp PNG graphic rendering
Symbologies Supported Code 39, Code 128 Code 128, Code 39, EAN-13, UPC, QR Codes
Print Quality High resolution print High resolution print

Troubleshooting Common Barcode Scanning Errors

  1. Scanner Returns a "Beep" but Nothing Appears in Sheets:
    Ensure your hardware scanner is configured to send a standard keyboard input (HID mode). Refer to your scanner manual's programming barcodes to reset it to USB/HID mode.
  2. Barcode Won't Scan off a Computer Monitor:
    Traditional laser scanners cannot read barcodes displayed on reflective LCD screens. Use a 2D CCD/imager scanner, or print the barcode on physical paper for laser testing.
  3. Code 39 Fails to Scan:
    Verify that your source text is enclosed with start and stop asterisks (e.g., ="*" & A2 & "*"). Without framing asterisks, scanners ignore Code 39 barcode fonts.

Comments