URL Encode / Decode

URL encode/decode.

Runs locally in your browser by default; no upload.

ToolHub ProRemove ads and unlock one-click file export on text-output tools below (image tool keeps its own download).

Unlock Pro on this tool

Batch encode/decode (per line) · One-click export download

Get Pro →
Batch mode requires Pro. See pricing
Input
Output

You may also need

About

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.

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.

Examples

Input

hello world

Output

hello%20world

FAQ

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.

Limitations

  • If the input contains truncated percent-escapes (like %E4), decoding will fail.
  • This tool is for URL component encoding; whole-URL encoding rules differ.

Recommended

Affiliate slots. Configure real links via environment variables.

No recommendations configured.