URL Encoder / Decoder
URL Encoder / Decoder converts text to and from percent-encoding with the browser's encodeURIComponent and decodeURIComponent.
How to use it
- Choose Encode or Decode
- Type or paste your text (or percent-encoded text) into the input box
- Get the result instantly, or a clear error if a percent sequence is malformed
- Copy the result with one click, or clear to start over
It escapes one URL component — a single query-string value or path segment — not a whole address: a full URL run through Encode comes back with :// turned into %3A%2F%2F. The characters A-Z, a-z, 0-9 and - _ . ! ~ * ' ( ) are left untouched; spaces, &, =, /, ?, # and the rest are escaped. Decode reverses it and reports a clear error on a malformed % sequence; a + is left as a literal plus, not turned into a space. Unlike the Base64 Encoder it keeps text readable and only escapes unsafe characters, and unlike URL Parser & Analyzer it transforms a fragment rather than splitting a full URL into parts. Input is limited to 2 MB and stays in the browser.
FAQ
A '%' not followed by two valid hexadecimal digits, such as a truncated or non-hex sequence. Decode then stops with a clear message instead of guessing.
You can, but Encode will escape the scheme and slashes too (https:// becomes https%3A%2F%2F). It is meant for one component — a parameter value or a path segment — not a complete address.
No. decodeURIComponent leaves + as a literal plus. The '+ means space' convention only applies to form-encoded query strings, which this tool does not assume.