ToolSnap
Developer

URL Encoder / Decoder

Percent-encode special characters for safe use in URLs, or decode an encoded string back to plain text. Instant results, no data sent to any server.

How to use

Encode: Paste any text — a URL, a query parameter value, a path segment — and click Encode. Special characters like spaces, &, =, #, and non-ASCII characters are converted to percent-encoded form.

Decode: Switch to Decode mode, paste a percent-encoded string, and get the original text back. Useful for reading encoded URLs from logs or API responses.

Swap: Moves the output back to the input so you can encode/decode again without copying manually.

Use cases

  • Encoding query parameter values before appending them to a URL
  • Decoding URLs from server logs or error messages to make them readable
  • Building redirect rules or rewrite configs with encoded paths
  • Encoding file names with spaces or special characters for use in REST API paths
  • Debugging double-encoded URLs from third-party integrations

Limitations

This tool encodes using the encodeURIComponent standard (RFC 3986), which is correct for encoding individual query parameter values. If you need to encode a full URL while preserving slashes and colons, use encodeURI semantics instead.

The tool does not validate whether the input is a well-formed URL — it encodes whatever text you provide.

Frequently asked questions

What is URL encoding?
URL encoding (percent encoding) replaces characters that are not allowed in a URL with a % followed by two hexadecimal digits. For example, a space becomes %20 and & becomes %26. This ensures URLs are transmitted correctly across the internet.
When do I need to URL encode something?
Any time you pass user-provided text as a query parameter (e.g., ?q=hello world), embed a URL inside another URL, or send special characters like &, =, #, or + in a URL. Browsers do some of this automatically, but APIs and backend code often require it explicitly.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URL and leaves characters like / : ? & = intact. encodeURIComponent encodes a single value meant to go inside a parameter — it encodes those characters too. This tool uses encodeURIComponent logic, which is correct for encoding values.
What does + mean in a URL?
In query strings, + is an older encoding for a space (used by HTML form encoding). %20 is the standard percent-encoded space. Both are common; this tool uses %20 (RFC 3986 standard).
Can I decode a URL that has been encoded multiple times?
Yes — paste it in and click Decode repeatedly until the output stabilises. Double-encoding is common when URLs are passed through multiple systems.

Related tools