%U
Developer/URL Encoder / Decoder

URL Encoder / Decoder

Encode or decode URLs with encodeURIComponent or encodeURI. 100% local.

100% LOCALRFC 39862 modesUnicode safeBrowser only
Input
Mode:
Output
Output will appear here
Data Source & Legal Disclaimer
Effective: 2026
Sources: Browser-side processing (no external API)

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.

See all data sources & update policy →

Why URLs escape special characters — illustrated

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).

One character becomes three
encodeURIComponenta ba%209bencodeURI = same, but keeps ? # //?/?unchanged – structure kept你 → UTF-8 E4 BD A0 → %E4%BD%A0 (three escaped bytes)

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.

A search query that survives copy-paste

You want to pass 'hello world' and a Chinese keyword in one URL query string.

  1. encodeURIComponent:hello%20world and %E4%BD%A0 — safe inside an &q= value even with & or = in the text
  2. Keep the separator:The & between params must stay literal, so you only escape each value, never the whole string
  3. The # trap:encodeURI leaves # intact → if your text has # it starts a fragment; that is why values use Component mode
  4. Round-trip:Decode restores the original bytes exactly — encode is always reversible
↩ Back to encoder

About this tool

What is this tool?

Encode and decode URLs with encodeURIComponent and encodeURI modes. Full Unicode support. 100% browser-based, free, no signup.

RFC 39862 modesUnicode safeBrowser only

What Is the URL Encoder / Decoder?

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.

Who Should Use This Tool?

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.

How Does It Work?

(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.

When Do You Use encodeURIComponent vs encodeURI?

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.

Frequently Asked Questions

What is the difference between encodeURIComponent and encodeURI?

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.

Does URL encoding affect SEO or redirect behavior?

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.

Related tools

Joke of the Day
Sep 6

What do you call a crab that plays baseball?

100% Free, Forever

Keep Tools Free for Everyone

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 free

100% of proceeds go towards hosting & building more free tools.