URL encoding is the process of converting special characters in URLs into a format that browsers and servers can correctly interpret.
Some characters like spaces, accents, & or = cannot appear directly in URLs. These must be encoded, for example, a space becomes %20.
Let's see how a URL looks before and after encoding, especially with accented characters and spaces.
html
https://example.com/search?q=readytools linksy
// encoded: https://example.com/search?q=readytools%20linsky
html
https://example.com/page?name=János
// encoded: https://example.com/page?name=J%C3%A1nos
You should encode values whenever sending user input or special characters in a URL, such as from a search box or form.
If a URL in an HTML link contains parameters with spaces or special characters, it must be encoded to work correctly.
html
<a href="https://example.com/search?q=hello%20world">Search</a>
JavaScript's built-in encodeURIComponent() function helps safely encode URL parameters so they work correctly in browsers and on servers.
html
encodeURIComponent("János & Kati")
// output: J%C3%A1nos%20%26%20Kati
If you receive already encoded text, you can decode it back to readable format using the decodeURIComponent() function.
html
decodeURIComponent("J%C3%A1nos%20%26%20Kati")
// output: János & Kati
Select Language
Set theme
© 2025 ReadyTools. All rights reserved.