X (Twitter) URL Parser

Social Media Network
Parsed URL
Type
Username
Content ID
Variant
Removed params

Introduction

X (Twitter) links are messy by design. The same tweet can arrive as a twitter.com link, an x.com link, a mobile-app share link with five tracking parameters, a trend-click search link, a /photo/1 view variant, or a hashtag link in any language. The content is identical – only the URL shape changes. The X (Twitter) URL Parser is a free online tool that recognizes more than twenty X link formats, extracts the tweet ID, strips the tracking noise, and rebuilds the link as a clean canonical URL, an official embed URL, or a share intent URL.

The parser is built for anyone who handles X links regularly: social media managers who publish them, community managers who archive them, marketers who track campaigns, researchers who collect them at scale, and developers who store them in databases. Instead of cleaning each link by hand or trusting a shortener that hides what it does, you paste the link and see exactly what the parser found – the link type, the username, the content ID, the view variant, and the parameters it removed.

Two properties set this tool apart. It parses instantly, updating the result on every keystroke, and it makes zero network requests – the link never leaves your browser. There is no server, no API quota, and no log of what you paste.

Use Cases

Publishing and campaigns. Before you put an X link in a newsletter, a blog post, or an ad comment, clean it with the canonical format. Tracking parameters such as s, t and twclid are share-session specific, go stale quickly, and make analytics reports misleading. Publishing the canonical URL keeps your content links stable and your metrics honest.

Archiving and deduplication. When you store X links in a spreadsheet, a CMS, or a research dataset, the same tweet can appear with dozens of different URL shapes – different domains, view variants, and parameter trails. The parser normalizes them all to one canonical form, so twitter.com/jack/status/20, x.com/jack/status/20, and the same link with ?s=20&t=… collapse into a single stable identifier you can dedupe against.

Trend monitoring. Trend-click links are the messiest X URLs in the wild: x.com/search?q=%23Gewitter&src=trend_click&vertical=trends. Every tweet in your monitoring spreadsheet arrives in this shape. The parser recognizes the pattern, normalizes a single-hashtag query to the canonical hashtag page, and strips the source parameters – one paste turns a trend link into a clean, shareable URL.

Website embedding. If you publish tweets on your own site, the embed format produces the official X embed widget URL (platform.twitter.com/embed/Tweet.html?id=…). Drop it in an iframe and X renders the tweet with official styling – no third-party embed services, no scraping.

Data hygiene. For developers and researchers, the parser doubles as a specification reference – the removed-parameters list tells you exactly which tracking keys X appends today, and the supported-formats table documents every route the tool recognizes.

An X link has three parts worth understanding: the host, the path, and the query string.

Take a real-world tweet link as shared from the mobile app:

https://twitter.com/markito0171/status/2089759704335482961/video/1?s=20&t=FakeNonce&ref_src=twsrc%5Etfw

The host twitter.com (or x.com, mobile.twitter.com) tells the parser which family the link belongs to. The path /markito0171/status/2089759704335482961/video/1 names the route – here a tweet with a video view variant. The query string mixes two kinds of parameters, which the parser treats very differently:

Parameter Kind What the parser does
2089759704335482961 (path) Identity Keeps it – this is the tweet's snowflake ID
/video/1 (path) View variant Keeps the tweet, records the variant – the same tweet, rendered as video
s=20 Tracking Removes it – share-sheet timestamp
t=FakeNonce Tracking Removes it – share nonce token
ref_src=twsrc^tfw Tracking Removes it – referral source (here, twitter-for-web embed)

Identity parameters tell you which tweet, profile, list, space, event or hashtag the link points to. Everything else is context – how you arrived, which app you came from, which view was open. The parser keeps the identity and drops the context, then reports the dropped keys so the cleanup is auditable.

The two domains. X rebranded from Twitter to X in 2023, and x.com became the primary domain in 2024. Both domains serve the same content and redirect to each other, and links copied from either place work identically. The parser accepts both, plus the legacy mobile.twitter.com subdomain, and always outputs the canonical form on x.com – the domain X itself redirects to today.

The i/ internal routes. A second family of links lives under /i/: x.com/i/web/status/{id} (the web app's tweet route, used when a tweet URL is opened without a username), x.com/i/spaces/{id} (live audio spaces), x.com/i/lists/{id} (lists addressed by ID) and x.com/i/events/{id} (timelines and moments). The parser recognizes each and maps it to its canonical form.

How It Works

Parsing runs entirely in your browser, with no network requests and no server round-trip. On every keystroke the parser runs the link through three stages:

  1. Host matching. The link is matched against the X domains: twitter.com and x.com, with any subdomain such as mobile. or www.. Lookalike domains such as evilx.com are rejected.
  2. Route matching. The path is split into segments and matched against the known route table – {user}/status/{id}, i/web/status, i/spaces, i/lists, i/events, hashtag, search, profile roots, and profile-tab paths.
  3. Query analysis. The q parameter of search links is decoded and classified, while tracking parameters are detected by three rules and collected into the removed list.

Every extracted value is validated against strict patterns before it is accepted: tweet IDs must be 15–19 digits, usernames 1–15 letters, digits or underscores, hashtags up to 30 characters in any Unicode script. Anything that fails validation makes the parser report an invalid link rather than guessing.

Because there is no network access, the parser never needs a loading state, never hits a rate limit, and produces results the instant you paste.

The parser recognizes more than twenty formats across seven result kinds.

Format Example Result kind
Tweet with username x.com/elonmusk/status/1234567890123456789 tweet
Tweet on the legacy domain twitter.com/jack/status/20 tweet
Tweet on a mobile subdomain mobile.twitter.com/elonmusk/status/1234567890123456789 tweet
Web app route (no username) x.com/i/web/status/1234567890123456789 tweet
Tweet photo view x.com/elonmusk/status/1234567890123456789/photo/1 tweet (variant photo)
Tweet video view x.com/elonmusk/status/1234567890123456789/video/1 tweet (variant video)
Tweet language view x.com/elonmusk/status/1234567890123456789/lang/zh tweet (variant lang: zh)
Tweet analytics view x.com/elonmusk/status/1234567890123456789/analytics tweet (variant analytics)
Plain profile x.com/elonmusk profile
Profile tab x.com/elonmusk/with_replies profile
List by slug x.com/elonmusk/lists/tech-leaders list
List by ID x.com/i/lists/1234567890123456789 list
Live space x.com/i/spaces/1zqKVZlLKvPJB space
Event or moment x.com/i/events/1234567890123456789 event
Hashtag page x.com/hashtag/tech hashtag
Unicode hashtag page x.com/hashtag/日本 hashtag
Hashtag search (normalized) x.com/search?q=%23Gewitter&src=trend_click hashtag
Plain keyword search x.com/search?q=hello+world search

Profile tabs are accepted generically: any lowercase word as the second path segment – with_replies, media, likes, following, followers, lists, moments, and any future tab – resolves to the profile itself, because a tab is a view of the profile, not a different resource.

The parser also rejects routes that are not shareable X content. Platform chrome such as home, explore, login, settings, messages and notifications returns an invalid-link message, as do malformed shapes such as an all-numeric username (x.com/1234567890), a tweet ID that is not 15–19 digits (x.com/user/status/1234), or a bare route with nothing to identify (x.com/hashtag/). The complete reserved list is documented in the Technical Specs chapter.

Understanding Snowflake IDs

Every tweet has a numeric ID, and the number is not random. X builds tweet IDs from the snowflake format: a 64-bit integer made of three parts – a 41-bit timestamp measured in milliseconds since the custom epoch of November 4, 2010, a 10-bit machine identifier, and a 12-bit per-machine sequence counter.

What that means in practice:

  • The ID encodes the exact millisecond the tweet was posted. For example, ID 2089759704335482961 decodes to a post time in August 2026 – you can verify this yourself with any snowflake decoder, no API required.
  • IDs have grown from 15 digits in 2010 to 19 digits today, because the timestamp bits keep growing. The parser accepts 15–19 digits, which covers the entire history of the platform.
  • The ID is the stable key of the tweet. Unlike usernames (which can change) and URL shapes (which vary), the snowflake never changes – use it to deduplicate links in a database, to search for the tweet, or to reference it in a CMS.

The parser validates the shape of the ID but does not decode it – decoding the timestamp is the job of a dedicated snowflake decoder. What matters for link cleaning is that the parser never mistakes a random number for a tweet ID and never guesses when the shape is wrong.

When you click a trending topic or a hashtag on X, the platform does not send you to a clean URL. It sends you to a search page with an encoded query:

https://x.com/search?q=%23Gewitter&src=trend_click&vertical=trends

The q parameter is the actual search query – here, percent-encoded, the single hashtag #Gewitter. The rest is arrival context: src=trend_click records that you came from a trending topic, and vertical=trends selects the trends view.

The parser handles these links in two ways:

Query shape Example Result
Exactly one hashtag q=%23Gewitter Normalized to the canonical hashtag page x.com/hashtag/Gewitter
Exactly one hashtag, any script q=%23%E6%97%A5%E6%9C%AC (日本) Normalized to x.com/hashtag/日本
Plain text or multiple terms q=hello+world, q=%23foo+%23bar Kept as a search link x.com/search?q=hello%20world

Why normalize at all? A hashtag search and the hashtag page show the same content, but the hashtag page URL is stable, short and shareable – and it is the form X itself uses in profiles and bios. Normalizing saves you from hand-editing every trend link that lands in your spreadsheet.

Plain keyword searches are not normalized (there is no canonical page for an arbitrary query), so the parser keeps them as search links and still strips the arrival context (src, vertical, f). Search links with an empty or missing q are rejected as invalid.

Tracking Parameters We Remove

X appends a long list of parameters to links, and the parser removes them with three detection rules:

  1. Campaign parameters – any key starting with utm_ (Google Analytics convention): utm_source, utm_medium, utm_campaign, utm_term, utm_content.
  2. Internal tokens – any key starting with a double underscore.
  3. The exact list – 19 known tracking, session and navigation parameters.

The most common exact-list parameters:

Parameter What it records
s Share timestamp added by the mobile app's share sheet
t Share nonce token, paired with s
twclid X click ID – which ad or search result the click came from
ref_src Referral source, such as twsrc^tfw for twitter-for-web embeds
ref_url The page where the link was clicked
ref Referrer shorthand
src Arrival context: trend_click, hashtag_click, tren (trending) and similar
cn Email-share tracking token (often base64-looking)
iid Campaign instance ID used by ads
ntref Notification context
ft Internal web client token
lang Display-language override
vertical Search view selector: trends, news, users
f Search filter: live, user, image, video
p, rd, rnd, cxt, bp Legacy and app context tokens, grouped under one rule

Identity parameters are never removed: the tweet ID in the path, the list ID, the space ID, and the q of a search link are the content itself. Deleting them would break the link.

Why is removal always safe? Tracking parameters describe how you arrived, not what the link points to. twclid, src and utm_* only change attribution reporting; the rendered content is identical without them. The removed-parameters row shows you exactly what was taken off, so the cleanup is verifiable at a glance.

Output Format Guide

Every parsed link can be rendered in three formats.

Format Output When to use it
Canonical URL The clean, stable link on x.com Publishing, archiving, deduplication, anything that stores a link long-term
Embed URL The official embed widget page platform.twitter.com/embed/Tweet.html?id=… Pasting into an <iframe> to render a tweet on your own site
Share URL An official intent URL (intent/retweet, intent/user, intent/tweet) Share buttons and campaign links

The canonical format always outputs the x.com domain – the current brand – regardless of which domain you pasted. Hashtag searches normalize to hashtag pages, and profile tabs collapse to the profile root.

The embed format is available for tweets only, because X's embed widget renders tweets. It produces the same widget URL that X's own embed script loads in an iframe – open it in a browser and you see the tweet rendered with official styling. The radio option is hidden automatically for profiles, lists, spaces and hashtags, where no widget exists.

The share format picks the right intent for the content: tweets use intent/retweet?tweet_id=… (open the retweet dialog for that tweet), profiles use intent/user?screen_name=…, and hashtags use intent/tweet?hashtags=… (compose a tweet with the hashtag prefilled). Intents live on twitter.com – the historical intent host – and X resolves them on either domain.

Usage

  1. Paste the link. Click the input field and paste the X URL (Ctrl+V or Cmd+V). The parser reads it as you type – there is no button to press.
  2. Read the result panel. Five rows summarize the parse:
Row What it shows
Type The result kind: tweet, profile, list, space, event, hashtag or search
Username The handle from the URL, as a clickable link to the profile
Content ID The extracted ID – tweet snowflake, list ID, space ID or hashtag tag
Variant The view variant of a tweet (photo, video, lang: zh, analytics) – empty for plain tweets
Removed params The tracking parameters that were stripped, comma-separated
  1. Pick the output format. Canonical URL is the default. Switch to Embed URL (tweets only) or Share URL when you need one of those forms. Formats that do not apply to the current link type are hidden automatically.
  2. Copy the result. The output field updates instantly; press Copy to put it on the clipboard.

Tutorial

Follow along with a complete example, from a trend-click link to a published clean URL.

Step 1 – Paste a trend-click link. Copy this link, as it arrives when you click a trending topic in the X app:

https://x.com/search?q=%23Gewitter&src=trend_click&vertical=trends&twclid=abc123xyz

Paste it into the input. The result panel fills in immediately: type hashtag, content ID Gewitter, and removed parameters src, vertical, twclid.

Step 2 – Copy the canonical URL. The output shows the clean hashtag page:

https://x.com/hashtag/Gewitter

The single-hashtag query was normalized to the canonical hashtag route – the URL X itself uses in profiles and bios.

Step 3 – Clean a shared tweet. Paste a mobile-app share link with its full parameter trail:

https://twitter.com/markito0171/status/2089759704335482961/video/1?s=20&t=FakeNonce&ref_src=twsrc%5Etfw

The type reads tweet, the username links to the profile, the ID is 2089759704335482961, the variant shows video, and the removed list shows s, t, ref_src. The canonical output collapses it to https://x.com/markito0171/status/2089759704335482961 – the /video/1 view is the same tweet, so the clean link points at the tweet itself.

Step 4 – Embed the tweet. Switch to Embed URL. The output becomes https://platform.twitter.com/embed/Tweet.html?id=2089759704335482961. Wrap it in an iframe on your site:

<iframe src="https://platform.twitter.com/embed/Tweet.html?id=2089759704335482961"
  width="550" height="600" style="border:none;overflow:hidden" frameborder="0"
  allowfullscreen="true"></iframe>

Step 5 – Handle a Unicode hashtag. Paste https://x.com/hashtag/%E6%97%A5%E6%9C%AC?src=hashtag_click. The type reads hashtag, the ID is 日本 (decoded from the percent-encoded path), and the canonical output is the encoded clean form https://x.com/hashtag/%E6%97%A5%E6%9C%AC.

Step 6 – Share a profile. Paste https://x.com/elonmusk and switch to Share URL. The output becomes https://twitter.com/intent/user?screen_name=elonmusk – the official follow intent, ready for a share button.

Pro Tips

  • Deduplicate archives by content ID. When you batch-clean a spreadsheet, the Content ID row is your stable key: the same tweet always yields the same snowflake, no matter which domain, variant or parameter trail it arrived in. Sort and dedupe on that column, not on the URL.
  • Normalize trend links before storing them. Trend clicks are the messiest X links in the wild, and they all collapse to a clean hashtag page with one paste. Build your monitoring workflow around the canonical hashtag form.
  • Use embed URLs with the official iframe. X's embed widget URL needs no extra JavaScript on your page – just the iframe shown in the tutorial. The widget handles responsive width and renders the official tweet styling.
  • Use share intents in campaigns. The Share URL format produces official intent links for retweet, follow and hashtag-compose actions. They work without any API key and open X's own dialogs.
  • Check the removed list as a monitoring signal. X occasionally changes its tracking vocabulary. If the removed list starts showing a parameter you have not seen before, it is worth a look – the parser surfaces exactly what the platform is appending today.
  • Profile tabs collapse automatically. Do not hand-edit x.com/elonmusk/with_replies to x.com/elonmusk in a spreadsheet – the parser does it for you and keeps the username row intact.
  • Paste links from anywhere. The parser accepts both domains and all subdomains, so links copied from the app, the web, newsletters or emails all work without normalization.

Alternatives

Option Strengths Weaknesses
This parser Zero requests, instant, snowflake-aware, 20+ formats, embed and share builders, auditable removal list, Unicode hashtags No API access to metadata such as tweet text or engagement counts
Manual editing in the address bar No tools needed Error-prone with long parameter trails, easy to delete the tweet ID by mistake, no embed or share formats
Generic URL cleaners Simple to use Built for shorteners and general links, not X routes; usually blind to snowflake IDs, view variants and search normalization
Browser extensions for link cleanup Automatic on selected pages Extensions see every link you browse, require install and permissions, and rarely cover X-specific formats
X API (official) Full metadata, search and posting Pay-per-use since February 2026 with no free tier – see the next chapter; cannot be used from a browser without keys

For one-off cleaning the canonical format of this parser is the fastest path; for batch research with metadata, an X API account may be appropriate – but it is a developer tool, not a link cleaner.

Against the Official APIs

The X API used to have a free tier. That changed in 2023 and again in 2026: X moved to pay-per-use pricing in February 2026, discontinued the free tier, and closed the legacy Basic and Pro subscriptions to new signups. Reading a single post costs around $0.005 (about $5 per 1,000 tweets), and user profile reads cost twice that. There is no free quota to prototype against.

This parser deliberately does not call the API at all. A local parser covers what the paid API cannot:

Situation Local parser X API
Link cleaning for any archive Instant, unlimited, offline Costs per read request
Trend-link normalization Parsed locally Requires a search endpoint call per link
Privacy Link never leaves the browser Sent to X servers and billed
Cost Free, no quota $0.005+ per post read, no free tier

The parser answers the question what is this link and what is its clean form – a question that needs no API, no key, and no quota. If you need tweet metadata on top of cleaning, an API account is a separate decision; the clean canonical URL this tool produces is exactly what you would feed to such an API anyway.

What It Doesn't Do

It cannot resolve t.co short links. Every link posted on X is automatically shortened to a t.co URL, and the target can only be discovered by following the redirect. Browsers cannot read the redirect destination because CORS does not expose it, and a zero-request parser never guesses. Open the short link once and copy the long URL from the address bar – the parser handles it immediately.

It rejects third-party mirrors. Nitter instances (nitter.net/…) and preview services such as fxtwitter.com and vxtwitter.com are not X domains, so they are rejected. Only twitter.com and x.com (with any subdomain) are accepted.

It rejects non-content routes. Platform chrome such as home, explore, login, settings, messages, notifications, compose, intent and share is not shareable content and is rejected as invalid, as are bare routes with nothing to identify (x.com/hashtag/, x.com/i/spaces/).

It does not fetch metadata. There is no request to X, so the parser never shows tweet text, author names, engagement counts, or post dates. It answers what is this link and what is its clean form – nothing more. (The snowflake ID itself encodes the post time, but decoding it is the job of a dedicated decoder.)

It does not modify anything. The tool never shortens, redirects, stores, or re-serves links. The output is a URL you take with you.

Troubleshooting

Problem Cause Solution
A t.co short link is reported invalid Short links cannot be resolved in the browser due to CORS Open the short link once and paste the long URL from the address bar
"Enter a valid X (Twitter) URL" appears The link uses a reserved route such as home or login, a malformed shape, or a non-X domain Check the link was copied from X itself. Reserved routes are rejected by design because they are not content
A search link shows as search, not hashtag The query is plain text or contains multiple terms Correct behavior – only single-hashtag queries normalize to hashtag pages
A trend link shows removed params src and vertical These are arrival-context parameters, not content Expected behavior – the canonical output is the clean hashtag or search link
The Embed radio is missing Embed widgets exist for tweets only Correct behavior – profiles, lists, spaces and hashtags have no widget page
A Unicode hashtag shows garbled characters The tag is percent-encoded in the URL The parser decodes it – the Content ID row shows the decoded tag (for example 日本) and the canonical output re-encodes it safely
A tweet ID is rejected as invalid The ID is not 15–19 digits Check the link was fully copied, including the trailing digits
The output keeps the /photo/1 view away View variants are the same tweet Correct behavior – the canonical URL points at the tweet itself; the Variant row records the original view

Privacy & Data Handling

This tool makes zero network requests. The URL you paste is processed entirely in your browser: no server receives it, no analytics script sees it, no third-party log records it. There is no account, no storage, and no way for the tool to know what you pasted after you close the page.

That makes the parser different from API-backed tools in one concrete way: the link, its tweet ID, and its username never transit any server you do not control. You can clean pre-publication links, internal campaign links, or links you were forwarded privately without them appearing in any third-party log.

The parser also does not load third-party scripts. The embed URL it generates points at X's own widget page, and X only sees those URLs if you choose to open or embed them yourself – the parser never loads them.

Technical Specs

Property Value
Processing 100% client-side, zero network requests
Update model Real-time on every keystroke
Accepted hosts twitter.com, x.com (any subdomain), mobile.twitter.com
Result kinds tweet, profile, list, space, event, hashtag, search
Tweet ID (snowflake) pattern 15–19 digits (\d{15,19})
Username pattern 1–15 letters, digits or underscores, not all digits
Hashtag tag pattern 1–30 characters from Unicode letters, numbers or underscores ([\p{L}\p{N}_]{1,30}), decoded from percent-encoding
Space ID pattern 10–15 alphanumeric characters
List slug pattern 1–40 alphanumeric, underscore or dash characters
Profile-tab rule Any lowercase word slug in the second path segment, non-numeric
Search rule q required; exactly one #hashtag normalizes to the hashtag page
Tracking-parameter rules utm_* prefix, __ prefix, and an exact list of 19 keys
Identity data kept Tweet ID, username, list ID, space ID, event ID, hashtag tag, search q
Output formats Canonical URL (x.com), Embed URL (tweet widget page), Share URL (retweet/follow/hashtag intents)
Dependencies None – plain JavaScript, no frameworks
Browser support Modern evergreen browsers (Chrome, Edge, Firefox, Safari) with URLSearchParams and Unicode property escapes

The reserved-route list is: home, explore, search, intent, share, compose, messages, notifications, settings, login, signup, help, tos, privacy, about, download, jobs, developers, analytics, support, feedback, blog, media, status, s, bookmarks, i, hashtag, lists.

Features

  • Parse 20+ X (Twitter) link formats – tweets, profiles, lists, spaces, events, hashtags and search links, on both twitter.com and x.com
  • Remove tracking parameters such as twclid, ref_src, src and utm_* automatically, and show exactly what was stripped
  • Extract the tweet ID and normalize hashtag search links into clean canonical hashtag pages
  • Build canonical x.com URLs, official embed widget URLs and share intent URLs in one click
  • Understand Unicode hashtags such as 日本, URL variants like /photo/1, and the i/ internal routes
  • Parse instantly in your browser with zero requests, so your links never leave your device

Frequently Asked Questions

Why does my X link contain s=20, t=… and twclid parameters?
X appends tracking parameters when a link is shared from the mobile app, clicked from a trending topic, or opened through third-party apps. The most common are s (the share timestamp), t (a share nonce token) and twclid (click attribution from X ads). These parameters do not change the content the link points to, only how the click is attributed, so removing them is always safe. The parser strips them automatically and lists what was removed so you can verify the cleanup.
What is the difference between twitter.com and x.com links?
None in terms of content – both domains serve the same pages and redirect to each other. twitter.com is the legacy domain from the pre-2023 era, and x.com is the current brand. The parser accepts both (plus mobile subdomains such as mobile.twitter.com) and always outputs the canonical form on x.com, because that is the domain X itself redirects to today.
What is a tweet ID and why is it a 15 to 19 digit number?
Every tweet has a numeric snowflake ID such as 2089759704335482961. The number is not random – it encodes the exact millisecond the tweet was posted, plus machine and sequence bits (see the Understanding Snowflake IDs chapter). The parser validates the length and shape of the ID so it never mistakes another number for a tweet ID.
Why is a t.co short link reported as invalid?
t.co links are X's official short links, and the target can only be discovered by following the redirect. Browsers cannot read the redirect destination of a t.co link because of CORS restrictions, and a client-side parser makes zero network requests by design. Open the short link once in your browser and copy the long URL from the address bar – the parser handles the full link immediately.
Why does a search link like x.com/search?q=%23Gewitter become a hashtag page?
Trending topics and hashtag clicks on X produce search links with an encoded query such as q=%23Gewitter instead of a clean hashtag URL. When the query is exactly one hashtag, the parser normalizes it to the canonical hashtag page https://x.com/hashtag/Gewitter and strips the source parameters such as src and vertical. Plain keyword searches are kept as search links.
Does this tool send my links to X or any server?
No. All parsing happens locally in your browser with no network requests at all. The URL you paste is only processed on your device, which makes the tool useful for sensitive or pre-publication links that you do not want to appear in third-party logs.
ESC