URL Encoder/Decoder
Encode or decode URLs and query parameters online. Runs in your browser—your data never leaves your device. Supports encodeURI/encodeURIComponent and + for spaces. Use with Base64 or JSON Formatter.
Enter text above and click Convert.
What is URL encoding?
URL encoding (percent-encoding) converts characters that are not allowed or reserved in URLs into a safe format: a percent sign (%) followed by two hexadecimal digits. For example, a space becomes %20 or + in query strings. This ensures that special characters in query parameters, path segments, or form data do not break the URL or get misinterpreted by servers.
JavaScript provides encodeURI (for full URLs or paths—leaves / and ? unencoded) and encodeURIComponent (for query parameter values—encodes more characters). This tool runs entirely in your browser; your input is never sent to our server.
Common uses:
- Query parameters — Encode values in
?key=valueso spaces,&,=don't break the URL. - Path segments — Encode filenames or slugs in paths (e.g.
/docs/hello world→/docs/hello%20world). - Form data —
application/x-www-form-urlencodeduses+for spaces; use "Space as +" when building or debugging such strings. - API and redirect URLs — Safely embed user input or dynamic values in callback URLs, redirect_uri, or API request URLs.
URL Encoder/Decoder FAQ
When should I use encodeURI vs encodeURIComponent?
Use encodeURIComponent for query parameter values (e.g. ?q=hello world → ?q=hello%20world). It encodes more characters. Use encodeURI for full URLs or path segments so slashes and protocol stay intact.
What does "Space as +" mean?
In query strings, spaces are often encoded as + instead of %20. Enable "Space as +" when encoding so spaces become plus signs, which some servers expect in application/x-www-form-urlencoded data.
Why do I see "malformed % sequence"?
Decoding failed because the string contains a percent sign followed by invalid hex (e.g. %x or %2). We replace invalid sequences literally and show a warning. Fix the source or decode in steps.
Is my input sent to a server?
Encoding and decoding run in your browser. Your text is not sent to our server except when you click Share, when we store the result temporarily (24h) to generate a share link.
What are the quick action chips for?
They set common presets: encode/decode query param (encodeURIComponent, space as +) and encode/decode path (encodeURI). Use them to quickly test or to see the difference between encoding a full path vs a single value.
Which characters get encoded?
encodeURIComponent encodes everything except A-Z a-z 0-9 - _ . ! ~ * ' ( ). encodeURI leaves / ? # [ ] @ ! $ & ' ( ) * + , ; = and alphanumerics unencoded. Use the tool to see the exact output for any string.