URL Encode / Decode
Escape text so it is safe inside a URL, or turn percent-escapes back into readable text. "Component" escapes everything reserved; "whole URL" keeps :/?#[]@ intact.
🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.
Options
Your result will appear here
Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.
How it works
Two scopes for two jobs
In component scope the whole string is percent-encoded, so every reserved character — colon, slash, question mark, hash, brackets and at-sign — is escaped along with spaces and anything non-ASCII. In whole-URL scope those structural characters stay intact and only genuinely unsafe bytes are escaped.
Encoding versus decoding
Encoding escapes bytes that are not URL-safe; decoding turns percent escapes back into readable text. Decoding is strict: a lone % or an incomplete %XX sequence raises an error rather than passing bad data through, because malformed escapes are a common cause of a rejected request.
The plus-as-space switch
Form bodies sent as application/x-www-form-urlencoded use + to mean a space, unlike a URL path where + is a literal plus. When decoding such a body, turn on “Treat + as space” so first_name=John+Doe becomes John Doe; leave it off when decoding a path segment where a + must survive.
A concrete case
A search box submits "blue shoes & sandals" and the request fails with a 400 because of the raw space and ampersand. Paste the value in component mode to get the escaped query parameter, or the whole URL in full mode to escape only the unsafe parts.
Handled in your browser
Both encodeURI and decodeURI run locally through the platform API — nothing is sent to a server, which matters when the URL carries a signed token, an internal hostname or a session id. The tool works offline.
Questions
Component vs whole URL?
Use "component" for a single query-string value or path segment. Use "whole URL" when the input is already a full URL and you only want to fix unsafe characters without breaking the structure.
Why did decoding fail with "Malformed percent-encoding"?
A lone % or a truncated escape such as %2 at the end of the string is not a valid sequence. Decoding refuses to guess, because passing the bad bytes through usually produces a worse failure further down the stack.
Does it handle non-ASCII text?
Yes. Text is encoded as UTF-8 bytes and each byte that is not URL-safe is percent-escaped, so café becomes caf%C3%A9 and decode returns the original text.
Related tools
See categoryBase64 Encode / Decode
Convert text or a file to and from Base64, with URL-safe and MIME line-wrap options.
HTML Entity Encode / Decode
Escape text for safe insertion into HTML, or decode named and numeric entities.
Query String <-> JSON
Parse a URL query string into JSON, or build a query string from a JSON object. Local only.
URL Parser
Break a URL into protocol, host, path, query parameters and hash.