URL Parser and Query String Editor
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.
MIME types list
| 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 |
Why parse URLs with the platform parser
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.
Keeping UTM tags tidy
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.
How it works
- Paste a URL. If you leave out https://, the parser adds it so a bare domain still works.
- Read each part in the table, with the query string decoded into name and value rows.
- Edit, add or remove parameters, or fill in the UTM fields, then copy the rebuilt URL.
- Switch to the User agent tab to read a browser string, or the MIME types tab to look up a file extension.
Tips
- The parser is the same one the browser uses, so what you see here is exactly how a link will be read by fetch, a router or an analytics script.
- Repeated keys are allowed: ?tag=a&tag=b keeps both values. Many frameworks only read the first, so check before relying on it.
- A + in a query string means a space when the form-encoding rules apply. Encode a real plus sign as %2B.
- Fragments after # are never sent to the server. Anything a server must see belongs in the path or query.
Frequently asked questions
What is the difference between host and hostname?
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.
How do I get query parameters in JavaScript?
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.
How reliable is user agent parsing?
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.
What MIME type should JavaScript files use?
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.
Does the tool send my URLs anywhere?
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.
More in Free Tools
- URL Slug Generator
- Usability Test Script Generator
- USP Generator and Unique Selling Proposition Examples
- UTM Link Builder
- UUID Generator
- Website UX Audit Checklist
- vCard Generator
- VPAT Template (Accessibility Conformance Report)
Product
Who It's For
- For Agencies
- For Freelancers
- For Hosting Providers
- For SaaS Platforms
- For Startups
- For Financial Services
- For Healthcare
Features
Resources
- Blog
- Help Center
- Free Business Tools
- Free UI Components
- Website Templates
- Template Collections
- Website Examples
- Guides
- Comparisons
- Alternatives
- Best Lists
- Reviews
- Pricing Guides
- Use Cases
- Glossary & Guides
- Integrations
- Developers
- Benchmark
- Windows App