How to use the URL encoder / decoder
- Paste or type your text or URL into the box.
- Click Encode to convert it to percent-encoded form, or Decode to convert an encoded string back to plain text.
- Read the result below and copy it for your project.
What percent-encoding means
URLs can only safely contain a limited set of characters. Spaces, ampersands, question marks, slashes and non-ASCII characters must be converted into percent-encoded sequences before they can appear in a URL. For example, a space becomes %20, an ampersand becomes %26, and a euro sign becomes %E2%82%AC.
This tool uses the browser's built-in encodeURIComponent and decodeURIComponent functions, the same routines browsers and servers use when they build and read URLs. That guarantees the output is exactly what a standards-compliant client would produce.
When encoding is required
| Scenario | What to encode |
|---|---|
| Query strings | Encode values before appending them after the ? in a URL. |
| Form data | Encode user input before sending it in a URL or request body. |
| API calls | Encode path and query parameters so special characters survive. |
| Debugging | Decode a messy URL to see the original readable text. |
Encode vs. decode
Encoding takes human-readable text and makes it safe to place inside a URL. Decoding reverses the process, turning %20 and friends back into the characters they represent. If you decode a string that contains invalid percent sequences, the tool reports an error instead of guessing, so you always know when the input is malformed.
Encoding and query strings
When you build a URL with a query string, only the values need encoding, not the whole address. For example, in https://example.com/search?q=hello+world the value after q= is the encoded part. Encoding the entire URL would turn the :// and / separators into percent codes and break the link, so paste only the portion you want to encode into this tool.
