URL Encode Decode
Encode text so it can safely appear in a URL, or decode percent-encoded text back to its original form. Choose URL component or full URL encoding and copy your result instantly.
Enter your text or URL
Encoding is not encryption. Avoid putting passwords, private keys, or other secrets in URLs because URLs may be saved in browser history, logs, and analytics.
Result
The result updates as you type. Percent-encoded bytes are represented by % followed by two hexadecimal digits.
What is URL encoding?
URL encoding, also called percent-encoding, represents characters that may have special meaning in a URL using a percent sign followed by two hexadecimal digits. For example, a space is commonly represented as %20. This helps text and data travel reliably in URLs.
How to use this URL encoder and decoder
- Choose Encode to prepare text for a URL or Decode to read percent-encoded text.
- Enter or paste your text into the input field.
- Select URL component for a query parameter or individual value, or Full URL to preserve URL separators.
- For encoding, optionally use + signs for spaces in form-style data.
- Copy the result or move it back to the input to perform the reverse operation.
URL encoding example
Text: Hello world!
URL component encoded: Hello%20world!
Form-style spaces: Hello+world!
Decoding the percent-encoded value returns the original text.
Frequently asked questions
What is the difference between encodeURI and encodeURIComponent?
Full URL encoding with encodeURI preserves structural characters such as slashes and question marks. encodeURIComponent encodes characters that could act as URL delimiters, making it more suitable for an individual query parameter value.
Should spaces be %20 or +?
Both forms are used in different contexts. %20 is the standard percent-encoded representation of a space. The plus sign is commonly used for spaces in application/x-www-form-urlencoded query data.
Does URL encoding protect private information?
No. URL encoding is a representation format, not encryption. Anyone can decode it, and URLs can be recorded in browser history, server logs, referrer data, or analytics.
Can I encode Tamil or other Unicode text?
Yes. Modern browsers encode Unicode text as UTF-8 before percent-encoding the bytes. The decoder converts valid percent-encoded UTF-8 back into readable text.
Why does decoding show an error?
The input may contain an incomplete percent escape, such as a percent sign without two hexadecimal digits, or malformed UTF-8. Check that the entire encoded value was copied correctly.
Is my text sent to a server?
Encoding and decoding happen in your browser using JavaScript. The entered text is not submitted to this page's PHP code for conversion.