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

Parse Freeform Address Strings in Google Sheets Using ShipEngine

May 13, 2026
4 min read
See the Excel version →

The Scenario

You are a data analyst at a direct-to-consumer brand. A growth team scrape pulled 500 freeform address strings from a web form into a Google Sheet, column A: lines like "1234 Main St, Springfield IL 62701" and "apt 4b 901 oak avenue san francisco ca 94105" — inconsistent capitalization, no structure, no separate fields.

You need clean, structured address data — street, city, state, ZIP, country — in columns B through F before the fulfillment team can create any shipments. The board deck is due Thursday and the fulfillment run is Wednesday.

The bad version of the next few hours:

  • Write a regex formula to try to split the address strings
  • Watch it fail on the apartment numbers and the inconsistent comma placement
  • Fix the failures manually, one at a time
  • Realize "san francisco" needs to be capitalized properly in 80 rows
  • You are still on row 120 at 6 PM.

The fast version is one prompt.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent inside your spreadsheet that reads the address strings and calls ShipEngine's address parsing API for you, so the structured fields land in the sheet without any regex.

Open the SheetXAI sidebar and type:

For each address string in column A of my Raw Addresses sheet, use ShipEngine to parse it into structured components and write street, city, state, ZIP, and country into columns B through F. If ShipEngine cannot parse a row, write 'PARSE ERROR' into column B and leave the rest blank.

SheetXAI reads the column, sends each string to ShipEngine's address parsing endpoint, and writes the structured fields back row by row. Five hundred rows, no regex.

What You Get

Columns B through F populated per row:

  • Street — normalized street address including apartment or suite number
  • City — properly capitalized
  • State — two-letter abbreviation
  • ZIP — padded to five digits
  • Country — two-letter country code

The parse errors are in their own flag, so you know exactly which rows need a human to fix the source string. Usually it is fewer than you expect.

After parsing, if you want to run ShipEngine validation on the results immediately, add that to the next prompt.

What If the Data Is Not Quite Ready

Web form scrapes are messy in specific, predictable ways. SheetXAI handles the parsing and the cleanup in the same prompt.

When some strings have extra junk text around the address

The scrape pulled "Ship to: 1234 Main St, Chicago IL 60601 — preferred address" with labels and notes mixed in.

For each value in column A of the Raw Addresses sheet, strip any leading labels like "Ship to:" or "Address:" and any trailing notes after the ZIP or country code. Then parse the cleaned string with ShipEngine and write street, city, state, ZIP, and country into columns B through F.

When international addresses are mixed in and need a different parsing path

About 50 rows are Canadian addresses with provinces instead of states. ShipEngine handles them differently.

Parse each address string in column A using ShipEngine. For rows where the country is Canada, write province into column C instead of state and postal code into column D instead of ZIP. Write the country code into column F for all rows.

When you only want to parse rows that have not already been processed

You ran this prompt on the first 200 rows last week. You do not want to overwrite those.

Skip any rows in the Raw Addresses sheet where column B is already filled in. Parse the remaining rows in column A using ShipEngine and write the structured fields into columns B through F.

When you need to parse, validate, and flag all in one pass before handing off to fulfillment

The fulfillment team needs a clean, validated, go/no-go list, not raw parsed output.

For each address string in column A of the Raw Addresses sheet, parse it with ShipEngine to get street, city, state, ZIP, and country — write those into columns B through F. Then validate each parsed address with ShipEngine and write 'valid', 'invalid', or the corrected normalized address into column G. Flag any rows where ShipEngine could not parse the original string in column H with 'PARSE FAILED'.

The pattern: parse and validate in one prompt, so the fulfillment team gets a fully prepared list instead of a halfway-done one.

Try It

Get the 7-day free trial of SheetXAI and open any sheet with a column of raw address text, then ask it to parse the strings with ShipEngine. The ShipEngine integration is included in every SheetXAI plan. For related workflows, see how to validate addresses before a label run or the ShipEngine in Google Sheets overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

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

Learn more