How to Split a URL into Columns in Excel (with UTM Parameters)
Every analytics export, ad report and referrer log arrives as a column of links with the campaign information buried in the query string. Getting utm_source and utm_campaign into columns of their own is the step before every campaign report — and the standard advice is to do it by hand, one parameter at a time.
Last updated: October 2026
| Link | Domain | Path | utm_source | utm_medium | |
|---|---|---|---|---|---|
| https://example.com/pricing?utm_source=google&utm_medium=cpc | → | example.com | /pricing | cpc | |
| https://www.example.com/blog?utm_source=newsletter | → | example.com | /blog | newsletter |
Method 1 — formulas
- Domain, in Microsoft 365:
=TEXTBEFORE(TEXTAFTER(A2,"//"),"/"). - Path:
=TEXTAFTER(A2,"/",3), then add the leading slash back. - A single UTM value:
=TEXTBEFORE(TEXTAFTER(A2,"utm_source="),"&")— wrapped inIFERROR, because the links that lack the tag return an error. - Then repeat that last one for every parameter you know about. The ones you do not know about stay invisible.
Method 2 — the 1-click way (Tellsheet)
Split URL into Parts
Select the column and run Split URL into Parts. Tick the pieces you want — domain (with or without the www.), path, query, protocol, fragment — and choose a column per utm_ parameter, per every parameter, or none. The keys are read from the links, so gclid, fbclid or a house tag like ref appear automatically. Values are percent-decoded, links with no scheme still parse, and anything that is not a link is left blank and counted.
Frequently asked questions
How do I get the domain out?
Nested TEXTBEFORE/TEXTAFTER, or one click here.
And the UTM tags?
One column per key, discovered from the data.
Links with no http://?
Handled — a scheme is assumed.
Is %20 decoded?
Yes, and "+" becomes a space.
Related Excel guides
Campaign columns, straight from the links
Split URL into Parts finds every parameter for you — with a preview before anything changes.
Get Tellsheet free See pricing