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.
To use it: open the tool, enter your inputs, and get instant results — encode and decode URLs with encodeURIComponent and encodeURI modes. Everything runs locally; nothing is uploaded.
FreeToolHub URL Encoder / Decoder is a free browser-based tool — encode and decode URLs with encodeURIComponent and encodeURI modes. No signup, no upload; everything runs locally in your browser.
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.
Whenever arbitrary text travels inside a URL. Reserved characters have jobs in a URL's grammar — ? starts a query, & separates parameters, # jumps to a fragment — so a value containing them must be percent-encoded (e.g. & becomes %26) or it will be misread as structure. Encode every query-parameter value you build by hand.
Scope. encodeURIComponent escapes everything with special meaning, so it is right for an individual parameter value (a city name, a search term). encodeURI preserves URL structure characters (?, /, &, =) so a whole URL stays parseable — using it on a parameter value leaves & and = unescaped and corrupts the query string. This tool exposes both modes so you can match the JavaScript function your code uses.
Two standards: the HTML form specification encodes spaces as +, while RFC 3986 percent-encoding uses %20. Browsers submit forms with +, but query strings you build yourself should use %20 — and a strict decoder will not turn + back into a space. If your spaces decode wrongly, you mixed the two conventions.
No, and confusing them causes real bugs. URL encoding (percent-encoding) makes text safe to travel inside a URL; HTML escaping (< & ...) makes text safe to display inside an HTML document. A value that is going into a query parameter needs URL encoding first — HTML-escaping it would send literal amp; junk to the server.
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.
Why did the fish get bad grades?
No signups, no data sold. The core of every tool is free forever — the optional Pro plan adds batch processing, unlimited downloads, white-label exports and an ad-free experience.
☕Support me on Ko-fi— keep tools free100% of proceeds go towards hosting & building more free tools.