URL Parser & Builder

Parse URLs into components (protocol, hostname, pathname, query parameters, hash) or build URLs from parts. Powered by the browser's native URL API.

Your data never leaves your browser Available via MCP

Enter a URL and click Parse

How to Use

  1. Select Parse URL to break down a URL into its components.
  2. Select Build URL to construct a URL from individual parts.
  3. Copy any result with the Copy button.

URL Components Explained

  • Protocol — the scheme (https:, http:, ftp:, etc.)
  • Origin — protocol + hostname + port (used by Same-Origin Policy)
  • Hostname — the domain name or IP address
  • Port — the network port (defaults: 80 for HTTP, 443 for HTTPS)
  • Pathname — the path to the resource (/api/v2/users)
  • Search/Query — key-value parameters after "?" (?page=1&limit=10)
  • Hash/Fragment — the anchor after "#" (#section-3)

Related Tools

Percent-encode URL components with the URL Encoder. Encode data for URL transmission with the Base64 Encoder. Convert curl commands to code with the Curl Converter. Generate QR codes from URLs with the QR Code Generator. Look up HTTP status codes with the HTTP Status Code Explorer.

Frequently Asked Questions

What is a URL?
A URL (Uniform Resource Locator) is a reference to a web resource. It has components: protocol (https:), hostname (example.com), port (443), pathname (/api/users), query string (?id=1), and fragment (#section).
How is this different from URL Encoder?
The URL Encoder percent-encodes individual strings for safe use in URLs. The URL Parser breaks down a complete URL into its components (protocol, host, path, query params, etc.) and can also build URLs from parts.
What is the difference between hostname and origin?
Hostname is just the domain (e.g., "example.com"). Origin includes the protocol and port: "https://example.com:8443". The Same-Origin Policy in browsers uses origin for security decisions.
Is my data safe?
Yes. All URL parsing happens entirely in your browser using the built-in URL API. No data is sent to any server.

Use this tool from AI agents. The CodeTidy MCP Server lets Claude, Cursor, and other AI agents use this tool and 46 others directly. One command: npx @codetidy/mcp

Drop file to load