URLs can only contain a limited set of characters, so anything else must be percent-encoded. This tool encodes text for safe inclusion in a URL and decodes it back.
How percent-encoding works
Reserved and unsafe characters are replaced by a percent sign and their two-digit hexadecimal byte value. A space becomes %20, an ampersand %26, and so on. Decoders reverse the process to recover the original text.
Component vs full URL
Encoding a single value (like a search term) needs encodeURIComponent, which escapes URL-structural characters. Encoding an entire URL uses encodeURI, which preserves them. This tool handles the component case, the one people need most.
Frequently asked questions
Also called percent-encoding, it replaces characters that aren't safe in a URL (like spaces, &, ?, =) with a % followed by their hex code — for example a space becomes %20.
Whenever you put arbitrary text into a URL — especially query parameters. Encoding prevents special characters from breaking the URL's structure.
This tool uses encodeURIComponent, which escapes characters like & and = so a value is safe inside a single query parameter. encodeURI leaves those intact for encoding a whole URL.