Text & Data Tools

URL Encode / Decode

Encode special characters for safe use in URLs, or decode percent-encoded strings back to readable text. Instant, in-browser.

Mode:
Plain text / URL
Encoded output
Common encodings — click to insert

encodeURIComponent vs encodeURI

encodeURIComponent encodes everything except letters, digits, and - _ . ! ~ * ' ( ). Use this when encoding a query parameter value or path segment.

encodeURI preserves characters that have meaning in a full URL — like : / ? # [ ] @ — so use it when encoding a complete URL while keeping its structure intact.

FAQ
What is percent-encoding?

Percent-encoding (URL encoding) replaces unsafe ASCII characters with a % sign followed by two hexadecimal digits. For example, a space becomes %20 and & becomes %26. This ensures special characters are transmitted correctly in URLs.

When do I need to URL-encode?

Any time you include user-provided data in a URL — query parameters, path segments, or form data. Characters like spaces, &, =, #, and non-ASCII characters (including Chinese, Arabic, etc.) must be encoded to avoid breaking the URL structure.

Why does + sometimes appear instead of %20?

In HTML form data (application/x-www-form-urlencoded), spaces are encoded as + rather than %20. In standard URL encoding (RFC 3986), spaces are always %20. This tool uses standard percent-encoding.

Can I encode non-English characters?

Yes. Non-ASCII characters like Chinese, Arabic, or emoji are first converted to their UTF-8 byte sequences, then each byte is percent-encoded. For example, 中 becomes %E4%B8%AD.