input.txt
output.txt
Encode text to a URL-safe format, or decode a URL-encoded string.

Related

Guides for URL Decode

All guides →

URL Encode & Decode

Percent-encoding (also called URL encoding) replaces unsafe ASCII characters with a % followed by two hexadecimal digits. For example, a space becomes %20 and a forward slash becomes %2F. This is required when including arbitrary text in a URL query string or path segment.

Use this as a url decoder when inspecting query parameters, redirect URLs, OAuth callbacks, or any value that has been percent-encoded. Paste the encoded string and click Decode to get the original text. Searches like* decoding url online* and decode url online all describe the same workflow.

On the encoding side, this matches JavaScript's encodeURIComponent — the same operation searched as javascript url encode /** javascript urlencode**. Paste raw text, click Encode, and you get the percent-encoded form ready to drop into a query string.

Example

Plain text: hello world & more

URL encoded: hello%20world%20%26%20more

  • Query parameters — values in ?key=value must be percent-encoded
  • API requests — search terms and filters passed in the URL need encoding
  • OAuth & JWT — tokens embedded in redirect URIs must be encoded

This tool uses encodeURIComponent / decodeURIComponent, which correctly handles Unicode characters.

FAQ

Why doesn't my + decode to a space?

In query strings a space may appear as a + (form encoding) or as %20. decodeURIComponent does not turn + into a space, so replace + with a space (or with %20) before decoding form-encoded data.