Encode or decode URLs with encodeURIComponent or encodeURI. 100% local.
This tool runs 100% in your browser. All computation happens locally on your device — your input is never uploaded to any server. Results are for reference only.
A URL is allowed to contain only a small safe alphabet (A–Z a–z 0–9 - _ . ~ plus a few reserved symbols). Anything else — spaces, &, /, ?, #, non-ASCII letters, emoji — would be misread as part of the URL structure. Encoding replaces them with % + two hex digits of their UTF-8 bytes; decoding reverses exactly that. encodeURIComponent escapes the widest set (good for a query value); encodeURI keeps structural punctuation like ? and # (good for a whole URL).
A space is byte 0x20 → %20. The Chinese character 你 (U+4F60) is three UTF-8 bytes E4 BD A0 → %E4%BD%A0. Decoding walks the %XX triplets and reassembles the bytes.
You want to pass 'hello world' and a Chinese keyword in one URL query string.
Encode and decode URLs with encodeURIComponent and encodeURI modes. Full Unicode support. 100% browser-based, free, no signup.
This tool converts text to percent-encoded URL format and back, solving the problem that URLs may only contain a limited ASCII set. Spaces, ampersands, hashes, CJK characters, and emoji all have reserved or illegal meanings in URLs and must be encoded as %XX sequences. Two modes cover the two real-world cases: encodeURIComponent mode encodes everything including & = ? / for use as a single parameter value, and encodeURI mode preserves URL structure characters so a full URL stays functional. Full Unicode support means Chinese, Arabic, and emoji text encode correctly to their UTF-8 percent sequences.
Web developers build query strings where user input contains spaces or symbols that would otherwise break parameter boundaries. Marketers construct UTM-tagged links with campaign names containing non-ASCII characters and verify how they survive email systems. API testers encode filter values into request URLs and decode values pulled from server logs to see what was actually sent. International users pasting CJK search terms into tools that expect encoded input use it constantly. Debugging teams decode encoded URLs from analytics reports to read the original destination.
(1) Paste your text or URL. (2) Pick the mode: component mode for a parameter value, full-URI mode for a complete URL where slashes and query separators must survive. (3) Read the encoded output — spaces become %20 (or + in form-encoding contexts), non-ASCII becomes multi-byte UTF-8 sequences, reserved characters become their percent forms. (4) Decode mode reverses any percent-encoded string, handling mixed UTF-8 sequences and the + as space form convention. Everything converts live and locally.
The two JavaScript functions map to the two encoding philosophies, and choosing wrong breaks URLs in different ways. encodeURIComponent is for individual values: it escapes everything with structural meaning — & = ? / # — so a value like a&b=c cannot inject fake parameters. Use it whenever user input becomes one query parameter. encodeURI is for complete URLs already assembled: it preserves the separators that make the URL work while encoding spaces and non-ASCII. Use it to sanitize a full link for display or transmission. The classic bug is using encodeURI on a parameter value, leaving & and = intact so downstream servers split the value into phantom parameters; the reverse bug mangles a full URL into unusability. This tool exposes both modes explicitly so you always pick the right one.
encodeURIComponent encodes all special characters including : / ? # [ ] @, making it suitable for encoding individual query parameter values. encodeURI preserves URL structural characters, making it suitable for encoding an entire URL. This tool supports both modes—use encodeURIComponent for parameter values, encodeURI for full URLs.
URL-encoded characters are decoded by the server before processing, so encoding does not change the destination page. However, excessive encoding in visible URLs can look spammy to search engines. Best practice: encode only special characters in query parameters, not in the path structure. Use hyphens for word separation in URL paths.
What do you call a crab that plays baseball?
No paywalls, no signups, no data sold. Built by a solo developer who believes useful tools should be accessible to everyone.
☕Support me on Ko-fi— keep tools free100% of proceeds go towards hosting & building more free tools.