URL Encoder

Encode special characters for safe use in URLs. Convert spaces, ampersands, and other characters to percent-encoded format.

Your data never leaves your browser

How to Use

  1. 1

    Enter your text

    Type or paste the text containing special characters you want to URL-encode.

  2. 2

    Click Encode

    The tool converts all special characters to their percent-encoded equivalents using encodeURIComponent.

  3. 3

    Copy the result

    Click Copy to use the encoded string in URLs, query parameters, or API requests.

What is URL Encoder?

URL encoding — officially called percent-encoding — converts characters that are not allowed in a URL into a safe, portable format. Each unsafe byte is replaced by a percent sign followed by two hexadecimal digits: a space becomes %20, an ampersand becomes %26, and a question mark becomes %3F. Without this step, query parameters break, API requests fail, and special characters cause silent data corruption.

Developers reach for a URL encoder every day: when building API calls with user-supplied query strings, when passing redirect URLs as parameters, when debugging webhook payloads, and when embedding text in HTML href attributes. If you have ever seen a mysterious %2F or %3D in your browser's address bar, you were looking at percent-encoded characters.

This encoder applies JavaScript's encodeURIComponent function, which encodes everything except the unreserved set (A-Z, a-z, 0-9, -, _, ., ~). That makes it safe for individual query-string values, form fields, and path segments. It produces standard RFC 3986 percent-encoding with %20 for spaces (not +).

Paste any text — including non-Latin characters, emoji, and multi-byte UTF-8 — and get the encoded string instantly. Processing happens entirely in your browser; nothing is sent to a server.

FAQ

What characters get encoded?
Everything except unreserved characters (A-Z, a-z, 0-9, -, _, ., ~) is percent-encoded. Common characters that get encoded include spaces (%20), & (%26), = (%3D), + (%2B), ? (%3F), # (%23), / (%2F), @ (%40), and all non-ASCII characters.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URI and preserves characters like :, /, ?, # that have special meaning in URLs. encodeURIComponent encodes everything except unreserved characters, making it suitable for encoding individual query parameter values. This tool uses encodeURIComponent.
Why do spaces sometimes become + and sometimes %20?
The + encoding for spaces is specific to application/x-www-form-urlencoded format (HTML forms). In standard URL encoding (RFC 3986), spaces are always %20. This tool uses %20.
How do I URL-encode non-English characters like Cyrillic or emoji?
Non-Latin characters are first converted to their UTF-8 byte sequence, then each byte is percent-encoded. For example, the Cyrillic letter Д (U+0414) becomes %D0%94 (two bytes), and the emoji 🚀 becomes %F0%9F%9A%80 (four bytes). This tool handles all Unicode characters automatically.
What is double encoding, and how do I avoid it?
Double encoding happens when you encode an already-encoded string. The percent sign in %20 gets encoded again to %2520. Always encode raw, unencoded text — never a string that already contains percent sequences. If you are unsure, decode first, then re-encode.

Related Articles

Related Tools