🔗

URL Encode / Decode

encodeURIComponent · encodeURI · RFC 3986 — Query Params Table · URL Builder · Batch Mode — 100% browser-side

Samples:
INPUT — PLAIN TEXT / URL
OUTPUT — ENCODED
🔗

Paste text → get encoded URL

Real-time · 200ms debounce · No button click needed

Ctrl+L ClearCtrl+S DownloadCtrl+Shift+C Copy outputS SwapP Pin

What is URL Encoding?

URL encoding (percent encoding) converts special characters into a % followed by two hex digits. For example, a space becomes %20, & becomes %26, and / becomes %2F. This ensures URLs remain valid across all browsers, servers, and APIs regardless of the special characters they contain.

encodeURIComponent vs encodeURI vs RFC 3986

encodeURIComponent is the safest choice for encoding individual query parameter values — it encodes everything except A-Z a-z 0-9 - _ . ! ~ * ' ( ). encodeURI is designed for full URLs and preserves characters like : / ? # [ ] . RFC 3986 is the strictest standard — also encoding ! ' ( ) * — recommended for OAuth signatures and API authentication headers.

Frequently Asked Questions

What is URL encoding?

URL encoding (percent encoding) converts special characters into a % followed by two hex digits. For example, a space becomes %20, & becomes %26. This ensures URLs remain valid across all browsers and servers.

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a full URL and preserves characters like :, /, ?, #. Use it for complete URLs. encodeURIComponent encodes a single URL component (like a query param value) and encodes almost everything including : and /. Use it for query string values.

What is RFC 3986 encoding?

RFC 3986 is stricter than encodeURIComponent — it also encodes !, ', (, ), and * which encodeURIComponent leaves unencoded. Use RFC 3986 for OAuth signatures, API authentication headers, and security-sensitive contexts.

How do I encode a URL with query parameters?

Encode each key and value separately using encodeURIComponent, then join with & and prepend the base URL. This tool's Query Params Table does this automatically — paste a URL and edit params directly.

Is URL encoding the same as Base64?

No. URL encoding replaces unsafe characters with %XX sequences and the result is readable text. Base64 converts binary to ASCII characters and changes the entire look of the data. Use URL encoding for URLs, Base64 for binary data in APIs.

Why does + mean space in URLs?

In HTML form submissions (application/x-www-form-urlencoded), + is used as a shorthand for space. However in modern URLs, %20 is preferred. This tool uses %20 (not +) for spaces by default — the correct approach for REST APIs.

You might also like

Related Tools