A URL splits into a protocol (https:), an optional username and password, a host name, an optional port, a path, a query string after ? and a fragment after #. Paste any link below to see each part, decode the query parameters into an editable table and rebuild the link with your changes.
| Part | Value |
|---|---|
| protocol | https: |
| hostname | shop.example.com |
| port | 8080 |
| pathname | /shoes/run |
| search | ?size=9&color=red |
| hash | #reviews |
Updated
Three small tools in one place: a URL parser with a query parameter editor and UTM fields, a user agent reader, and a searchable list of the MIME types web servers send most often.
| Extension | MIME type | Used for |
|---|---|---|
| .html | text/html | Web pages |
| .css | text/css | Stylesheets |
| .js / .mjs | text/javascript | Scripts (the current standard type; application/javascript is obsolete) |
| .json | application/json | Data and API responses |
| .webmanifest | application/manifest+json | Web app manifest |
| .xml | application/xml | XML documents, sitemaps |
| .txt | text/plain | Plain text, robots.txt |
| .csv | text/csv | Spreadsheet data |
| .md | text/markdown | Markdown |
| application/pdf | Documents | |
| .zip | application/zip | Archives |
| .png | image/png | Lossless images |
| .jpg / .jpeg | image/jpeg | Photos |
| .webp | image/webp | Modern images |
| .avif | image/avif | Modern images |
| .gif | image/gif | Animations |
| .svg | image/svg+xml | Vector images |
| .ico | image/vnd.microsoft.icon | Favicons (image/x-icon is also widely used) |
| .woff2 | font/woff2 | Web fonts |
| .woff | font/woff | Web fonts (older) |
| .ttf | font/ttf | Desktop fonts |
| .otf | font/otf | Desktop fonts |
| .mp4 | video/mp4 | Video |
| .webm | video/webm | Video |
| .mp3 | audio/mpeg | Audio |
| .wav | audio/wav | Audio |
| .ics | text/calendar | Calendar invites |
| .wasm | application/wasm | WebAssembly |
Splitting a URL with a regular expression or string methods breaks on the edge cases: user info before the host, IPv6 addresses in square brackets, ports, encoded characters and relative paths. The URL class built into browsers and Node follows the WHATWG URL Standard, so it handles all of those the same way the browser does when someone clicks the link.
It also normalises as it goes. The host is lowercased, default ports are dropped and dot segments in the path are resolved, which is handy when comparing two links that look different but point to the same place.
UTM parameters tell analytics which campaign sent a visitor. Pick one spelling per source and medium and stick to it, because email, Email and e-mail show up as three separate rows in reports.
Never add UTM tags to internal links on your own site. They start a new session in most analytics tools and overwrite the real source of the visit.
hostname is the domain or IP address alone, such as shop.example.com. host adds the port when one is given, such as shop.example.com:8080. When the port is the default for the protocol (443 for https), the parser leaves it out of both.
Use new URL(link).searchParams, then call get("name") for one value or getAll("name") for repeated keys. For the current page, new URLSearchParams(location.search) does the same job. Both decode percent-encoding for you.
Treat it as a hint. Chromium-based browsers now report a reduced string where the operating system version and device model are frozen to fixed values, and any browser can send whatever string it likes. For feature decisions, test for the feature itself instead.
text/javascript. The current specification (RFC 9239) makes it the one standard type and marks application/javascript and the others as obsolete, though browsers still accept them.
No. Parsing happens in your browser with its built-in URL parser and nothing is uploaded or logged.
Related: URL encoder and decoder, UTM builder, Redirect checker, HTML entities, HTML links guide.
Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.
We.Inc is an AI-powered website builder you can resell under your own brand. Launch a branded client dashboard, bill on Stripe Connect, and deliver AI-generated websites in minutes. White-label plans start at $99 a month for 25 client sites, with a 7-day free trial and no per-site fees.