URL Parser & Decoder

Protocol
Copy
https://
Hostname
Copy
example.com
Username
Copy
me
Password
Copy
pwd
Port
Copy
5436
Pathname
Copy
/t/url-parser
Search
Copy
?key1=value&key2=value2
Hash
Copy
#the-hash
Parameters
Copy
                    {
  "key1": "value",
  "key2": "value2"
}
                
Overview
Generated by AI

URL parser decomposes links into protocol, hostname, port, path, query parameters, and hash components, automatically formatting into readable structure. Supports automatic completion of missing protocols, JSON conversion of query parameters, and hash parameter parsing, suitable for development debugging, link validation, and data cleaning scenarios.

Core Features

  • Complete Component Parsing: Decomposes protocol, username, password, hostname, port, path, query, and hash
  • Automatic Protocol Completion: Automatically attempts to add https:// when entering pure domain names
  • Query Parameter JSON Conversion: Converts URL parameters to readable JSON format
  • Hash Parameter Support: Parses key=value parameters in hash fragments
  • Quick Copy: One-click copy of any component or parameter JSON

How to Use

Input URL

  1. Paste complete URL or domain name in input box
  2. When protocol is missing, tool automatically attempts to complete as https://
  3. Valid links immediately display parsing results; invalid links show error prompts

View Parsing Results

Parsing results are divided into following sections:

URL Components

  • Protocol: Protocol part of URL, like https://
  • Hostname: Domain name or IP address
  • Username: If URL contains authentication information
  • Password: If URL contains authentication information
  • Port: Port number, empty if not specified
  • Pathname: Path part, like /t/url-parser
  • Search: Query string, like ?key=value
  • Hash: Hash fragment, like #section

Each component can be quickly copied by clicking the copy button.

Query Parameters JSON

If URL contains query parameters, displays in JSON format:

  • Single value parameters display as strings
  • Repeated parameters display as arrays
  • Example: { "key1": "value", "key2": ["value1", "value2"] }

Hash Parameters JSON

If hash fragment contains key=value format parameters, parses separately and displays as JSON:

  • Only parses when hash contains =
  • Format same as query parameters
  • Common in single-page application (SPA) routing parameters

Use Cases

Development Debugging

Quickly check if API callback URL parameters are correct. Debug OAuth callback address token and state parameters. Verify deep link paths and parameters. Analyze hash parameters in frontend routing.

Clean user-submitted links, unify protocol and format. Check webhook and callback address protocols and ports are correct. Verify configuration file URL field completeness. Identify authentication information or sensitive parameters in links.

Data Cleaning

Batch extract domain names or paths from URL lists. Unify link formats from different sources (like standardizing protocol to HTTPS). Analyze request parameter distribution in log files. Parse URL fields from CSV exports or API responses.

Parsing Examples

Example 1: Complete URL

Input:

https://me:[email protected]:5436/t/url-parser?key1=value&key2=value2#the-hash

Parsing result:

  • Protocol: https://
  • Username: me
  • Password: pwd
  • Hostname: example.com
  • Port: 5436
  • Pathname: /t/url-parser
  • Search: ?key1=value&key2=value2
  • Hash: #the-hash

Query parameters JSON:

{
  "key1": "value",
  "key2": "value2"
}

Example 2: Auto Complete Protocol

Input:

example.com/path?q=nuxt&lang=en

Auto standardized to:

https://example.com/path?q=nuxt&lang=en

Technical Features

Standardized Parsing

  • Based on browser native URL API, ensuring accurate parsing results
  • Complies with RFC 3986 and WHATWG URL standards
  • Correctly handles various special characters and URL encoding

Notes

  • Parsing only occurs on client side, does not send URL content to server
  • URLs containing sensitive information (passwords, tokens) should be used cautiously
  • Tool only parses URL structure, does not verify link accessibility or validity
  • For URLs containing Chinese or other non-ASCII characters, recommend URL encoding first
Show more