Back to Neutrino in Google Sheets
SheetXAI logo
Neutrino logo
Neutrino · Google Sheets Guide

Parse User-Agent Strings in a Google Sheet Using Neutrino

2026-05-15
5 min read

The Scenario

Your product team just exported a web analytics dataset from your tracking platform. The sheet has 5,000 rows and column A is full of raw User-Agent strings — the kind that look like "Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15..." — and your mobile-vs-desktop breakdown report is due at the end of the week.

Your product analyst needs device type and browser name for each row so she can segment the data. The tracking platform doesn't parse User-Agents. Neutrino does.

The bad version:

  • Write a regex to parse User-Agent strings — which works for the obvious patterns and fails silently on everything else
  • Spend an hour tuning the regex, test on 20 rows, realize it's misclassifying tablet strings as mobile and certain bot agents as desktop
  • Give up on the regex and look for a batch processing option, find one that caps at 1,000 rows per CSV upload

You have 5,000 rows and a deadline. The regex is not the answer.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent inside your Google Sheet. Through its built-in Neutrino integration, it parses every User-Agent string in column A and writes device type, browser name, and OS into the columns you specify — across all 5,000 rows in one operation.

For each User-Agent string in column A, run Neutrino UA lookup and write device type in column B, browser name in column C, and OS name in column D.

What You Get

  • Column B: device type (desktop, mobile, tablet, bot) for every row
  • Column C: browser name
  • Column D: operating system name
  • All 5,000 rows processed in one pass — ready to pivot for the mobile-vs-desktop breakdown

What If the Data Is Not Quite Ready

You only need mobile vs. desktop for the report, not the full breakdown

For each User-Agent string in column A, use Neutrino to parse it and write TRUE in column B if the device is mobile, FALSE if it is desktop or tablet. Write the browser name in column C.

Some rows have the session ID and User-Agent concatenated in the same cell

For each row in column A, extract only the User-Agent portion (starting from Mozilla/ or the browser engine token). Then run Neutrino UA lookup and write device type in column B, browser name in column C, and OS in column D.

You want to flag bot traffic separately before the analysis

Parse all User-Agent strings in column A with Neutrino. Write device type in column B, browser name in column C, and OS in column D. Flag any row where the device type is bot with BOT in column E and highlight those rows gray.

Full analytics prep in one shot

Parse all 5,000 User-Agent strings in column A with Neutrino. Write device type in column B, browser name in column C, and OS in column D. Flag bot rows with BOT in column E and highlight them gray. Then add a summary table below the data showing the count and percentage breakdown by device type.

Try It

Get the 7-day free trial of SheetXAI and open your analytics export, then ask SheetXAI to parse every User-Agent string in column A with Neutrino and write device type and browser into the columns your product analyst needs for the segmentation report. See also the IP geolocation spoke if you also have IP addresses in this export that need country and city enrichment.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more