URL Encoder & Decoder

Free URL encoder and decoder. Percent-encode text for use in URLs or decode encoded URI components. Runs in your browser.

AI-ready Use this tool with AI

This tool has a free JSON API. Copy a prompt or skill below to use it with ChatGPT, Claude, or any AI agent — no API key needed.

API docs
Enter text above.

How url encoder & decoder works

URL encoding (also called percent encoding) converts special characters into a format that can be safely transmitted in a URL. Characters that are not allowed in a URL, like spaces, ampersands, and non-ASCII characters, are replaced with a percent sign followed by their hexadecimal code (e.g. space becomes %20).

This tool uses the standard encodeURIComponent and decodeURIComponent functions. Encoding replaces all unsafe characters. Decoding reverses the process, converting percent-encoded sequences back to their original characters.

URL encoding is essential when building query strings, passing data in URLs, or working with APIs. For example, a search query like "hello world & co" must be encoded to "hello%20world%20%26%20co" before it can be used in a URL.

Frequently asked questions

What is URL encoding?
URL encoding (percent encoding) replaces special characters with a percent sign followed by their hex code. This ensures URLs remain valid when they contain spaces, symbols, or non-ASCII characters.
What is the difference between encodeURI and encodeURIComponent?
encodeURI preserves URL-meaningful characters like /, ?, and =. encodeURIComponent encodes everything including those. This tool uses encodeURIComponent, which is correct for query parameter values.
How do I decode a URL-encoded string?
Switch to Decode mode, paste the encoded string, and the tool converts it back to readable text. For example, hello%20world becomes hello world.
Is my data sent to a server?
No. All encoding and decoding happens in your browser. Your text is never uploaded, so it is safe for sensitive data.