Encode and decode URLs and text
URL encoding replaces unsafe characters such as spaces, &, ? and non-English letters with percent codes so that a link works correctly. This tool encodes text for use in URLs and decodes percent-encoded text back to normal. Developers and marketers use it for query strings, redirects and tracking links.
A space is not allowed inside a URL, so it is replaced with its percent code, which is %20.
Usually you encode only the values of query parameters. Encoding the entire URL also changes characters like : and /, which can break the link.
URLs can only contain a limited set of characters. Other characters, such as spaces, &, = and non-English letters, are replaced with a percent sign followed by their hexadecimal code. This is called percent-encoding. A space becomes %20, and & becomes %26.
This tool uses encodeURIComponent, which encodes every character except letters, digits and - _ . ! ~ * ' ( ). It is designed for encoding individual values, such as a search term in a query string.
Encode a value: tea & biscuits = 50% becomes tea%20%26%20biscuits%20%3D%2050%25.
Full URL: If you encode https://example.com/my page?x=1 completely, the colon, slashes and question mark are also encoded: https%3A%2F%2Fexample.com%2Fmy%20page%3Fx%3D1. Encode only the parts that need it, such as the value after ?q=.
A space is not allowed in a URL, so its ASCII code (20 in hexadecimal) is written after a percent sign.
Usually not. Encode the individual parameters and keep the structure of the URL intact.
Yes. Non-ASCII characters are converted to their UTF-8 bytes and then percent-encoded.
Encoding converts special characters into % codes. Decoding turns the % codes back into normal characters.