About this tool
Encode spaces, symbols and non-English characters so they can be used safely in links and query strings, or decode a percent-encoded URL to see what it really says.
How to use it
- Choose Encode or Decode.
- Paste your text or URL.
- Copy the result.
Good to know
- Encoding uses encodeURIComponent, which is right for individual query values.
- Malformed percent sequences are reported instead of silently ignored.
- No data leaves your browser.
Why URLs need encoding
Some characters have special meaning in a web address: ? starts the query, & separates values, = joins a name to its value and # starts a fragment. Spaces and non-English letters are not allowed at all. Encoding replaces them with a % followed by two hex digits, so the value arrives intact.
Example
A search for “tea & coffee” becomes tea%20%26%20coffee. Without encoding, the & would cut the value in half and the server would read only “tea ”. A WhatsApp link with a pre-filled message works the same way — the message must be URL-encoded.
Encode values, not whole links
This tool encodes like encodeURIComponent, which is right for a single query value. Encoding an entire URL would also encode the :// and / characters and break the link — encode only the part that goes after = in the query.
Common characters and their codes
space → %20 · & → %26 · = → %3D · ? → %3F · / → %2F · # → %23 · + → %2B · % → %25. Letters, digits and - _ . ~ never need encoding.
Non-English text is encoded byte by byte in UTF-8, so the Urdu word لاہور becomes %D9%84%D8%A7%DB%81%D9%88%D8%B1. Browsers show the readable form in the address bar but send the encoded one.
Spaces: %20 or +?
In the query string of a form submission, a space is often sent as +. Elsewhere in a URL it must be %20. When building a link by hand — for example a WhatsApp link with a pre-filled message — %20 is the safe choice and works everywhere.
Frequently asked questions
Why does a space become %20?
URLs cannot contain spaces, so each one is replaced with its percent-encoded value.
Should I encode a whole URL?
Usually no — encode only the parts you insert, such as a search term or parameter value.