Guides/Tool Guides

URL Encode / Decode Guide

URL encode/decode.

Overview

URL-encode or decode text for safe transport in query strings, form bodies, and redirects. This tool follows encodeURIComponent semantics (ideal for query parameters). Runs locally in your browser.

Pro time-savers

  • Batch encode/decode (per line)

Use cases

  • Encode a query parameter value containing spaces, Unicode, or reserved characters.
  • Decode a percent-encoded callback URL to inspect its real contents.
  • Fix double-encoded values (e.g. %2520) by decoding step-by-step.

Common pitfalls

  • If you encode a full URL with encodeURIComponent, you’ll also encode : / ? & and break it. Use encodeURI for full URLs.
  • Plus-sign (+) is sometimes used for spaces in query strings; decodeURIComponent does not treat + as space automatically.
  • Double-encoding (%25...) is common when values pass through multiple layers. Decode step-by-step.

FAQs

encodeURI vs encodeURIComponent — which should I use?

Use encodeURIComponent for query parameter values. encodeURI is for an entire URL and won’t encode reserved characters like :, /, ?, &.

Why does decode throw an error?

The input likely contains invalid or incomplete percent-encoding (e.g. a truncated %E4). Make sure the string is complete.

Why do I see %2520 instead of %20?

That’s double-encoding. Decode once to get %20, then decode again to get a space.

Does this change + into space?

In query strings, + is sometimes used for spaces. If your data uses that convention, replace + with space before decoding.

Examples

Input

hello world

Output

hello%20world