Skip to content

URL Encoder & Decoder

Percent-encode or decode URL components, full URIs, and form bodies.

Input

What this tool does

Percent-encoding (RFC 3986) turns characters that would otherwise confuse a URL parser — spaces, ?, &,#, non-ASCII letters — into a safe %XX form. This tool encodes and decodes URL components, whole URIs, and HTML form bodies (the +-for-space variant). Everything runs in your browser — nothing is uploaded.

How to use it

Pick Encode or Decode, choose the variant that matches your use case, and paste your input.

Component (most common):

Input:  hello world & friends
Output: hello%20world%20%26%20friends

Full URI (preserves : / ? & etc.):

Input:  https://example.com/path?q=hi there
Output: https://example.com/path?q=hi%20there

Form (space → +):

Input:  hello world
Output: hello+world

Limits and edge cases

  • Pick Component when you’re embedding a value inside a URL (a query value, a path segment). Pick URI when you’re encoding a whole URL and want to preserve : / ? & = #.
  • Form matches what HTML forms POST as application/x-www-form-urlencoded — the only difference from Component is that spaces become +.
  • Decode surfaces a precise offset for malformed escape sequences (a stray %, a non-hex pair). For binary payloads, use the Base64 tool instead.

Frequently asked questions

Is my data sent to a server?
No. Both encode and decode happen entirely in your browser; the page never uploads your input.
What's the difference between Component and URI?
URI-component encoding escapes the URL structural characters (: / ? & = #). URI encoding leaves them alone so the URL still parses. Use Component for query values, Use URI for a whole URL.
When should I use Form (+ for space)?
Use Form when you're building an application/x-www-form-urlencoded body — the format HTML form POSTs use and the format URLSearchParams.toString() emits. The only difference from Component is + ↔ space.
Does it handle Unicode (CJK, emoji)?
Yes. Input is encoded as UTF-8 before percent-escaping, so 你好 → %E4%BD%A0%E5%A5%BD and 👋 → %F0%9F%91%8B round-trip cleanly.
Why did decode fail with 'URI malformed'?
Your input contains a stray % or an invalid escape (like %2G — G isn't a hex digit). The error message points at the bad offset.