URL Encoder & Decoder
Encode special characters in URLs or decode encoded URL strings back to readable text.
URL Encoding: Making URLs Safe for Transmission
URLs can only contain a limited set of characters (letters, numbers, and -._~). Special characters like spaces, /, ?, #, &, = and non-ASCII characters (Hindi, Chinese, emoji) must be percent-encoded before they can appear in a URL. This is called URL encoding or percent encoding. Without proper encoding, URLs break, parameters get confused and international characters are mangled. Our URL encoder handles full URLs and individual components with proper RFC 3986 compliance.
Frequently Asked Questions
What is the difference between encodeURI and encodeURIComponent? ▼
encodeURI() encodes a full URL — it does NOT encode characters that are valid URL delimiters like :, /, ?, #, &, =. Use for encoding a complete URL. encodeURIComponent() encodes everything including :, /, ?, # — use for encoding individual query parameter values, not the full URL.
How to fix "URL contains invalid characters" error? ▼
This usually means special characters (spaces, &, %, #, <, >) are in the URL without proper encoding. Use our URL Encoder in "Encode Component" mode to encode the problematic part. Spaces become %20 (or + in query strings), & becomes %26, # becomes %23.
How are Hindi or Devanagari characters encoded in URLs? ▼
Non-ASCII characters like Hindi (देवनागरी) are first converted to UTF-8 bytes, then each byte is percent-encoded. For example, "अ" (U+0905) encodes as %E0%A4%85 in a URL. Modern browsers display the decoded Unicode in the address bar, but the actual URL sent to the server is percent-encoded.
How to decode a URL encoded string? ▼
Paste the percent-encoded string (e.g., hello%20world%21) into our input and click Decode. The tool uses decodeURIComponent() to restore the original string. This is useful for reading redirect URLs, debugging API calls and reading encoded query parameters.