What is the URL Encoder Tool?#
The URL Encoder Tool converts text into percent-encoded form for use in URLs, and turns percent-encoded text back into readable form. Switch between Encode and Decode to go in either direction.
Percent-encoding replaces characters with special meaning in URLs with a % and two hex digits, such as %20 for a space. Encoded text only uses safe characters, so it can be embedded in a URL without breaking it.
How to Use#
- Choose Encode or Decode.
- Open the Options panel to pick the encoding convention, space handling, or per-line conversion.
- Type or paste the text. The result updates as you type, ready to copy from the output box.
Encoding Convention#
Two conventions are available, matching JavaScript's standard encodeURIComponent and encodeURI functions.
- encodeURIComponent: encodes every character except letters, digits, and
-_.!~*'(). Recommended for query parameter values and other text embedded in a URL. - encodeURI: keeps the characters that structure a URL, such as
;,/?:@&=+$#, alongside letters and digits. Best for encoding a whole URL or path.
Decoding offers the same two conventions. With encodeURI, encoded reserved characters like %3A are left as they are. With encodeURIComponent everything is decoded.
Space and Line Handling#
- Space encoding (encode only): choose
%20 (Standard)for standard percent notation, or+ (Plus)for query strings and form submissions. - Plus sign handling (decode only): turn on
Restore + as spacesto convert+to a space when decoding.%20always decodes to a space. - Convert each line separately: converts each line independently while keeping line breaks (
\n) and carriage returns (\r). Lines that fail stay as they are, and a note appears under the input.
Common Use Cases#
- Build a query parameter value that contains spaces or special characters without breaking the URL.
- Decode a percent-encoded string from a link, log, or cookie to see the original text.
- Prepare text to embed in a URL or a link in code, where raw special characters would cause problems.
Frequently Asked Questions#
No. Everything runs in your browser, and your text is not uploaded anywhere.
Percent-encoding does not treat + as a space; a space is encoded as %20. If your input uses
+ for spaces, the Restore + as spaces option converts them while decoding.
Yes. Text is encoded as UTF-8, so any language and emoji are supported.
The tool flags input that is not valid percent-encoding or not valid UTF-8. Check that each %
is followed by two hex digits and the string is not cut off, then paste it again.
With per-line conversion turned on, lines that cannot be converted are left as they are. Fixing the broken lines updates the output.