Technology
URL Encoder / Decoder
Encode or decode text and URLs instantly with native percent-encoding. Safely convert special characters for query strings, links, and APIs — all in your browser.
URL Encoder / Decoder
Method
How this calculator works
Encoding uses encodeURIComponent() to convert reserved characters to %XX hexadecimal escapes; decoding uses decodeURIComponent() to reverse them.
- Paste or type the text or URL fragment you want to convert into the input box.
- Click Encode to percent-encode the text, or Decode to reverse an already-encoded string.
- Copy the result from the read-only output box for use in your links or code.
- If decoding fails because of a malformed sequence, an error message explains the problem.
Use cases
When to use it
- Building safe query-string parameters for API requests.
- Debugging why a link with special characters breaks.
- Decoding percent-encoded values pulled from server logs.
- Preparing search terms and redirects that contain spaces or symbols.
FAQ
Frequently asked questions
What is URL encoding?
URL encoding, also called percent-encoding, replaces unsafe or reserved characters in a URL with a percent sign followed by two hexadecimal digits. For example, a space becomes %20, ensuring the URL is transmitted safely across the web.
What is the difference between encoding and decoding?
Encoding converts human-readable text into a percent-encoded, transmission-safe form. Decoding reverses the process, turning percent-encoded sequences back into the original readable characters.
Why do I get an error when decoding?
Decoding fails when the input contains a malformed percent-sequence, such as a lone % or %ZZ that is not valid hexadecimal. The tool catches this and shows an error instead of crashing.
Does this use encodeURIComponent or encodeURI?
This tool uses encodeURIComponent, which escapes reserved characters like &, =, ? and /, making it ideal for encoding individual query-string values rather than an entire URL.
Is my data sent to a server?
No. Encoding and decoding happen entirely in your browser with native JavaScript functions, so your text is never uploaded anywhere.