calc-hub logocalc-hub.net

URL Encode / Decode

URL-encode any string (replace special characters with %XX hex codes) or decode an encoded URL string back to plain text.

How to use the URL Encode / Decode

  1. Enter your inputs into the URL Encode / Decode above.
  2. Results update instantly as you type — no submit button needed.
  3. Adjust any value to see how the result changes in real time.

The URL encoding rules

Unreserved chars (A–Z, a–z, 0–9, − . _ ~) stay as-is · · · Others → %HH where HH is the byte's hex code

Per RFC 3986. Spaces become %20 (or + in query strings). Multi-byte UTF-8 characters become multiple %HH codes — e.g., "é" → %C3%A9.

Worked example

"hello world" → "hello%20world". "user@example.com" → "user%40example.com". "café" → "caf%C3%A9".

Frequently asked questions

When is URL encoding needed?

Any time data goes into a URL query string, form data or path. Browsers handle this automatically when you type or click; you only encode manually when constructing URLs in code.

Is space encoded as %20 or +?

In query strings (after ?), historically + means space. Everywhere else, %20. Modern URLs increasingly use %20 everywhere for consistency.

Does Unicode need special encoding?

Yes — UTF-8 encode the character first, then percent-encode each byte. "京" is 3 UTF-8 bytes (E4, BA, AC), encoded as "%E4%BA%AC".

We use cookies

We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.

By clicking "Accept", you agree to our use of cookies.
Learn more.