URL parse and query convert
Split a URL into its parts and parameters, turn a query string into JSON, or build a query string from a JSON object.
Process locally
Files stay in this browser session. Closing or clearing releases them.
Add text
Type or paste the text to process
Adjust settings
Optional: Operation, Percent-encoding, Sort parameters by name
Run
Processes in this browser; cancel at any time
About this tool
Split a URL into its protocol, host, port, path, query parameters and fragment, with percent-encoded text such as %E4%BD%A0 decoded. You can also turn a query string into JSON for an API test, or build a query string from a JSON object.
Repeated parameters are all kept, decoding and encoding can follow encodeURIComponent or HTML forms (+ for spaces), and parameters can be sorted by name. Up to 1 MB of text is processed in your browser and is not uploaded.
How to use it
- Paste a URL, a query string or a JSON object, or select “Use example” to load a URL with encoded Chinese text and a repeated parameter.
- Choose the “Operation”: “Parse a URL”, “Query string to JSON” or “JSON to query string”.
- Pick the “Percent-encoding”, and tick “Sort parameters by name” if you want them sorted.
- Select “Run”, then preview the result and download it as url.json, query.json or query.txt.
Formats and limits
- Input
- Text
- Output
- JSON, Plain text
- Size limit
- 1 MB
- Settings
- Operation (Parse a URL, Query string to JSON, JSON to query string); Percent-encoding (Percent-encoding, Form encoding, None, keep as written); Sort parameters by name
- Privacy
- Files stay in the current browser session. No file bytes are uploaded.
- Price
- Free, no sign-up
Common questions
Why is + not turned into a space?
With “Percent-encoding (encodeURIComponent)”, + stays a plus sign and only %20 means a space. Choose “Form encoding (+ for spaces)” for query strings from HTML forms, where + stands for a space.
How are repeated parameters such as tag=a&tag=b handled?
“Parse a URL” lists each one separately, in order. “Query string to JSON” collects the values into an array, and “JSON to query string” turns an array back into repeated keys.
Are nested keys like user[name]=Tom supported?
No. Brackets stay part of the key, so the JSON gets a key named user[name]. When building a query string, a nested object, or an array inside an array, is written as JSON text and then encoded.
What if the URL has no protocol?
http:// is assumed, so example.com/a?b=1 can be parsed too. The port is empty when it is the protocol’s default, and a non-ASCII domain is shown in its xn-- Punycode form.
What does “Malformed percent-encoding” mean?
A % sign is not followed by a valid encoded character, for example a bare 100% in a value. Choose “None, keep as written” to see the text without decoding, or write the % as %25.
Related tools
JSON format and validate
Format, minify or sort JSON, repair common mistakes, or escape it as a string. Errors show the line and column, and large numbers keep every digit.
JSON to code types
Generate TypeScript interfaces, C# classes, Java records, Go structs, Rust serde structs or Python dataclasses from sample JSON. Fields missing from some samples become optional.
JSON, YAML and XML converter
Validate, pretty-print or convert between JSON, YAML and XML for their shared subset. External entities and custom tags are rejected.
Key-value pairs to code
Turn key=value or key: value lines into JSON, YAML, .properties, .env, TypeScript, Python, PHP, Java, C#, Go, HTML options or SQL.
URL batch generator
Generate a list of links from a template: (*) becomes a number from an arithmetic or geometric sequence, with zero padding, or a letter.
Code formatter
Format or minify HTML, CSS, SCSS, Less, JavaScript, TypeScript, JSON, Markdown, YAML, XML, SQL, C, C++, C#, Java, PHP, Python and nginx configuration.