URL / URI Encoding

URL Encoder / Decoder

Encode text into percent-encoded URL format, or decode an already-encoded URL back to readable text. Supports both full-URI and component encoding modes.

Advertisement

Input Text or URL

Result


Enter text or a URL to encode/decode
⚠️

Disclaimer: This tool runs entirely in your browser — no data is sent to any server. Always verify encoded URLs work as expected in your target application before deploying to production.

About the URL Encoder / Decoder

URL encoding (also called percent-encoding) converts characters that aren’t allowed in a URL — like spaces, ampersands, and special symbols — into a %XX format safe for transmission over the web.

Component vs. Full URI Encoding

Component encoding (encodeURIComponent) escapes nearly all special characters, making it ideal for encoding individual query parameter values. Full URI encoding (encodeURI) preserves structural characters like : / ? # & = so it’s safe to use on an entire URL without breaking its structure.

Common Use Cases

URL encoding is essential when passing user-generated text (like search queries or form data) as part of a URL, ensuring spaces, quotes, and other special characters don’t break the link or introduce security issues.

Frequently Asked Questions

Use component encoding (encodeURIComponent) when encoding a single value that will be inserted into a URL, like a query parameter. Use full URI encoding (encodeURI) when you have a complete URL and want to preserve its structure (slashes, question marks, etc.) while still encoding unsafe characters.
Spaces aren't valid in URLs, so they must be percent-encoded. %20 is the standard percent-encoding for a space character (some older systems use + instead, but %20 is the RFC 3986 standard).
This tool runs entirely in your browser using JavaScript's built-in encodeURIComponent/decodeURIComponent functions — no data is transmitted to any server, so it's safe to use with any text.
Decoding fails if the input contains malformed percent-encoding (e.g. a stray % not followed by two valid hex digits). Double-check that your encoded string wasn't truncated or manually edited incorrectly.
Advertisement