URL Encode/Decode
Encode and decode URL components safely
Input
Output
Encode URL components without breaking your queries
Special characters — spaces, ampersands, slashes, non-ASCII letters — break query strings if they're not percent-encoded. The right tool for the job depends on whether you're encoding a full URL or a single component, and choosing wrong is a frequent source of bugs. This tool handles both cases and shows you exactly what each character becomes.
Use the tool when you need to
Encode a query parameter value
Percent-encode a search term, slug, or special string before slotting it into a query string.
Decode a URL from a log
Reverse %20, %2F, and other escapes to read what the request actually contained.
Audit an OAuth or callback URL
Check that the redirect, scope, and state parameters are encoded correctly before debugging the flow.
How to encode or decode URL components
- 1
Paste the URL or component into the input area.
- 2
Click Encode or Decode based on which direction you need.
- 3
Copy the result and slot it back into your URL or test request.
Keep going
Common URL-encoding workflows
Encode the user's query before constructing the destination URL to avoid breaking on spaces or symbols.
Decode a logged URL to confirm what the user clicked and which parameters arrived.
Decode the state to confirm it round-trips through the auth provider untouched.
Related Tools
Base64 Encode/Decode
Encode and decode Base64 strings in the browser
JSON Formatter
Beautify JSON from APIs, AI tools, and logs with configurable indentation
JWT Decoder
Decode and inspect JWT tokens — header, payload, and expiry
JSON Validator
Validate API and AI-generated JSON with detailed error messages and line numbers
Frequently Asked Questions
URL encoding (percent-encoding) replaces unsafe characters with a % followed by two hex digits. For example, a space becomes %20 and an ampersand becomes %26. This ensures special characters don't break URL parsing.
Characters that have special meaning in URLs must be encoded: spaces, &, =, ?, #, /, @, and non-ASCII characters. Letters, digits, and - _ . ~ are safe and don't need encoding.
Paste the parameter value (not the entire URL) and click Encode. For example, if your search query is 'hello world & more', encoding produces 'hello%20world%20%26%20more', which is safe to use in a URL query string.
encodeURI encodes a full URL but preserves URL-structural characters like :, /, ?, #, &. encodeURIComponent encodes everything except letters, digits, and - _ . ~ — use it for individual parameter values.