URL Encoder / Decoder — Encode & Decode Query Strings Safely
URLs and query parameters often contain characters that must be percent-encoded so they don't break the URL or get misinterpreted. When you build links programmatically or inspect URLs from logs and redirects, you need a quick way to encode or decode those strings. Doing it in the browser with a dedicated tool keeps your data local and gives you instant results. This encoder and decoder uses the same rules as JavaScript's encodeURIComponent and decodeURIComponent, so the output is safe for query parameters and path segments. Whether you're debugging a redirect, building an API query, or teaching percent-encoding, having the tool right there saves time and avoids mistakes. Encoding applies to a single component (e.g. one query value), not the whole URL; that way you avoid double-encoding slashes and other structural characters. For form data that uses + for spaces, be aware that this tool uses %20 for space when encoding.
What Does This Tool Do?
This tool encodes plain text to URL-safe percent-encoded form and decodes percent-encoded strings back to plain text. You paste or type into the input area and click Encode or Decode. Encoding uses the standard rules: letters, digits, and a few safe characters (like - _ . ! ~ * ' ( )) stay as-is; everything else becomes %XX where XX is the hex code of the byte in UTF-8. So spaces become %20, and Unicode characters are encoded as multiple bytes. Decoding reverses that: it takes a percent-encoded string and returns the original text, or shows an error if the input is malformed (e.g. an incomplete % sequence). All processing runs in your browser; no data is sent to a server. You can copy the result or clear the fields. The tool follows RFC 3986-style encoding so the result is safe to embed in query strings and path segments. If you paste a full URL, encode only the dynamic parts (e.g. the value of a query parameter) to avoid breaking the URL structure.
How to Use It (Step-by-step)
Paste or type into the Input area. For encoding, enter the plain text (e.g. a query value or path segment). For decoding, enter the percent-encoded string (e.g. from a URL or log).
Click Encode to convert to percent-encoded form, or Decode to convert back to plain text.
Check the Output area. If decoding fails, you'll see an error; fix invalid % sequences (e.g. % alone or %G) and try again.
Use Copy to copy the output to the clipboard.
Use Clear to reset input and output. When encoding a full URL, encode only the parts that need it (e.g. the query string) to avoid double-encoding.
Key Features & Use Cases
- Client-side only: no data is sent to a server.
- Standard encodeURIComponent / decodeURIComponent behavior.
- Encode: convert text to percent-encoded form for URLs and query params.
- Decode: convert percent-encoded back to plain text with clear errors.
- Copy the result to the clipboard.
- Encode query parameter values before building API or redirect URLs.
- Decode URLs or query strings from logs and debug output.
- Build safe links that include user input or dynamic values.
- Inspect OAuth callback URLs or redirect parameters.
- Encode form data for application/x-www-form-urlencoded payloads.