Parse URL Query Parameters
Enter a URL above to parse its query parameters
What Is a URL Query String?
A URL query string is the portion of a URL that follows the question mark (?). It contains data passed to the server as key-value pairs, with each pair separated by an ampersand (&) and keys separated from values by an equals sign (=).
URL Structure Example
https://example.com/search?q=hello%20world&page=2&sort=date
└─────────┬─────────┘└──┬──┘└───────────────┬───────────────┘
base URL path query string
In this example, the query string q=hello%20world&page=2&sort=date contains three parameters:
q= "hello world" (space was encoded as %20)page= 2sort= "date"
How Percent Encoding Works
URLs can only contain a limited set of characters. Special characters and spaces must be percent-encoded (also called URL encoding) to be safely transmitted. The encoding replaces each unsafe character with a % followed by its two-digit hexadecimal ASCII code.
| Character | Encoded | Reason |
|---|---|---|
| Space | %20 or + | Not allowed in URLs |
| & | %26 | Reserved as parameter separator |
| = | %3D | Reserved as key-value separator |
| ? | %3F | Reserved as query string start |
| / | %2F | Reserved as path separator |
| # | %23 | Reserved as fragment identifier |
| + | %2B | Sometimes means space in queries |
Common Use Cases
- Debugging API requests — See exactly what parameters are being sent to backends
- Analyzing UTM links — Extract campaign tracking parameters for marketing analysis
- URL inspection — Understand complex URLs with many parameters
- Data extraction — Pull specific values from URLs for automation
- Security testing — Inspect parameters for injection attempts or malformed data
- OAuth debugging — Decode authorization codes and tokens in redirect URLs
Frequently Asked Questions
What is a URL query string?
A URL query string is the part of a URL that comes after the question mark (?). It contains key-value pairs separated by ampersands (&), used to pass data to web servers. For example, in "example.com/search?q=hello&page=2", the query string is "q=hello&page=2".
What does percent encoding mean in URLs?
Percent encoding (also called URL encoding) replaces unsafe characters with a percent sign followed by two hex digits representing the character's ASCII code. For example, a space becomes %20, an ampersand becomes %26, and non-ASCII characters are encoded as UTF-8 byte sequences. This ensures URLs remain valid and parseable by all systems.
What is the difference between + and %20 in URLs?
Both represent a space character, but they come from different encoding standards. The + sign for spaces comes from the application/x-www-form-urlencoded format used by HTML forms. The %20 encoding follows the RFC 3986 URI standard and works everywhere in a URL. In query strings, servers typically accept both. This tool decodes both formats correctly.
How do I decode a URL query string manually?
To decode manually: (1) Split the string by & to get individual parameters. (2) Split each parameter by = to separate keys from values. (3) Replace + with space. (4) Find each %XX sequence and convert the hex digits to the corresponding character. For UTF-8 text, multiple %XX sequences may represent a single character.
What are UTM parameters?
UTM (Urchin Tracking Module) parameters are special query parameters used by analytics tools to track marketing campaigns. The five standard UTM parameters are: utm_source (traffic source), utm_medium (marketing medium), utm_campaign (campaign name), utm_term (paid keywords), and utm_content (ad variation). Example: ?utm_source=google&utm_medium=cpc&utm_campaign=spring_sale
Can a URL have duplicate parameter names?
Yes, URLs can have multiple parameters with the same name, like ?color=red&color=blue. How these are handled depends on the server. Some take the first value, some take the last, and some combine them into an array. This tool displays all parameters, including duplicates, so you can see exactly what's in the URL.
What is the maximum length of a URL query string?
There's no official limit in the HTTP specification, but practical limits exist. Most browsers support URLs up to 2,048 characters (Internet Explorer) to 64,000+ characters (modern browsers). Servers often limit URL length to 8,192 characters by default. For large data, use POST requests instead of query strings.
Why do some URLs have a hash (#) after the query string?
The hash (#) marks the start of a fragment identifier, which points to a specific section within a page. The fragment is not sent to the server—it's handled entirely by the browser. Single-page applications often use fragments for client-side routing. In the URL structure, the query string always comes before the fragment: ?query=value#section
How do I encode special characters for URL parameters?
In JavaScript, use encodeURIComponent() for parameter values. This encodes all characters except A-Z, a-z, 0-9, and - _ . ~ which are safe in URLs. For a complete URL, use encodeURI() which preserves the URL structure characters. Never use escape() as it's deprecated and handles Unicode incorrectly.
Are query string parameters case-sensitive?
It depends on the server. Parameter names are typically case-sensitive (id and ID are different), but some frameworks normalize them. Parameter values are always preserved exactly as sent. Percent-encoded hex digits (%2f and %2F) are equivalent per the spec, but best practice is to use uppercase (%2F).
Privacy & Limitations
- All calculations run entirely in your browser -- nothing is sent to any server.
- Results are computed locally and should be verified for critical applications.
Related Tools
- HTML to Markdown Converter -- Convert HTML to clean Markdown format
- CSS Grid Generator -- Build CSS Grid layouts visually with live preview and code export
- Hash Generator -- Generate MD5, SHA-1, SHA-256, SHA-512 hashes
- XML Formatter -- Format, beautify, and validate XML
Related Tools
View all toolsBig-O Notation Visualizer
Interactive plot of O(1) through O(n!) complexity curves with operation count comparison
JSON Formatter
Format and beautify JSON with proper indentation
JSON Validator
Validate JSON syntax and show errors
CSV to JSON Converter
Convert CSV data to JSON format with auto-detection
JSON to CSV Converter
Convert JSON arrays to CSV format with nested object handling
JWT Decoder
Decode JWT tokens and display header and payload
URL Query Decoder FAQ
What is a URL query string?
A URL query string is the part of a URL that comes after the question mark (?). It contains key-value pairs separated by ampersands (&), used to pass data to web servers. For example, in "example.com/search?q=hello&page=2", the query string is "q=hello&page=2".
What does percent encoding mean in URLs?
Percent encoding (also called URL encoding) replaces unsafe characters with a percent sign followed by two hex digits. For example, a space becomes %20, and special characters like & become %26. This ensures URLs remain valid and parseable.
How do I decode a URL query string?
To decode a URL query string, first split it by ampersands (&) to get individual parameters, then split each parameter by the equals sign (=) to separate keys from values, and finally apply percent decoding to convert encoded characters back to their original form.
What is the difference between + and %20 in URLs?
Both represent a space character, but in different contexts. In query strings (after the ?), the + sign traditionally represents a space (from HTML form encoding). The %20 encoding works everywhere in a URL. Modern systems accept both, but %20 is more universally compatible.
Why are URL parameters important for web development?
URL parameters enable passing data between pages without forms, tracking user sessions and analytics, filtering and sorting content, pagination, API requests with specific criteria, and marketing attribution through UTM parameters.