URL Encode & Decode

Encode URLs for safe transmission or decode percent-encoded strings back to readable text.

πŸ”’ 100% private β€” runs entirely in your browser
or try sample data

What is URL Encoding?

URL encoding (also called percent-encoding) replaces unsafe characters in URLs with a percent sign followed by their hex code. This ensures URLs transmit correctly across the internet. For example, a space becomes %20 and an ampersand becomes %26.

  • Encode URL β€” uses encodeURI() to encode a full URL while preserving the structure (://?#&= are kept).
  • Encode Component β€” uses encodeURIComponent() to encode a value for use inside a query parameter (encodes everything including &, =, ?).
  • Decode β€” decodes any percent-encoded string back to readable text.
  • Swap β€” move the output back to input for chained conversions.
  • Privacy-first β€” all processing happens in your browser.

How to Use URL Encoder/Decoder

Encode or decode URLs and query strings in three steps.

1. Paste Your String

Enter a URL, query parameter value, or any string that needs percent-encoding. The tool handles Unicode and special characters.

2. Choose Encoding Mode

Select encodeURIComponent for query parameter values or encodeURI to encode a full URL while preserving its structure. Click Encode or Decode.

3. Copy or Swap

Copy the encoded or decoded result, or use Swap to reverse the operation and verify round-trip accuracy.

Common Use Cases

Encoding Query Parameters

Safely encode values before appending them to URLs. Characters like &, =, and spaces must be percent-encoded to avoid breaking the query string structure.

Decoding Tracking URLs

Marketing and analytics platforms wrap URLs in layers of encoding. Paste a percent-encoded redirect URL here to decode it and reveal the actual destination.

Building OAuth Redirect URIs

OAuth flows require the redirect_uri parameter to be properly encoded. Paste your callback URL, encode it with encodeURIComponent, and drop it into the authorization request.

Frequently Asked Questions

How do I URL encode or decode text online?

Paste your text into the input field and click Encode to convert it to a URL-safe format, or click Decode to convert a percent-encoded string back to readable text. Results appear instantly with no server calls.

What is URL encoding?

URL encoding (also called percent-encoding) replaces unsafe or reserved characters in a URL with a percent sign followed by two hex digits (e.g., space becomes %20). This ensures URLs are valid and can be transmitted correctly by browsers, servers, and APIs.

Is my data private when using this URL encoder?

Yes. All encoding and decoding runs entirely in your browser. No data is transmitted to any server, so it's safe to encode API keys, query parameters with sensitive values, and authentication tokens.

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a full URI but preserves characters that have special meaning in URLs (like /, ?, #, &). encodeURIComponent encodes everything except letters, digits, and a few safe characters β€” use it for encoding individual query parameter values. This tool uses encodeURIComponent for maximum safety.

Which characters need to be URL encoded?

Characters that must be encoded include spaces, &, =, ?, #, /, +, and non-ASCII characters like accented letters and emoji. Reserved characters have special meaning in URLs and must be encoded when used as data rather than delimiters.

Is this URL encoding tool free?

Yes, it's completely free with no sign-up or usage limits. All processing runs locally in your browser.