Free URL Encoder & Decoder — Percent-Encode Any Text or URL
Encode special characters for URLs or decode percent-encoded strings back to readable text. Works for any language including Hindi, Nepali, and Chinese.
Why Is URL Encoding Necessary?
RFC 3986 (the URL standard) defines which characters are "safe" in URLs:
- Unreserved characters (never encoded): A–Z, a–z, 0–9,
-,_,.,~ - Reserved characters (have special meaning in URLs):
/,?,#,&,=,:,@ - Everything else must be percent-encoded: spaces,
+,@in query params, brackets, non-ASCII characters
Without encoding, a URL like https://example.com/search?q=café latte breaks because the space and é are invalid characters.
With encoding: https://example.com/search?q=caf%C3%A9%20latte — the é becomes %C3%A9 and the space becomes %20.
Common URL-Encoded Characters
| Character | Encoded | Why it needs encoding |
|---|---|---|
| Space | %20 (or + in forms) | URLs cannot contain spaces |
| & | %26 | Separates query parameters |
| = | %3D | Separates key from value in query params |
| + | %2B | Means space in form data |
| # | %23 | Indicates fragment identifier |
| ? | %3F | Starts query string |
| / | %2F | Path separator |
| @ | %40 | Separates user info from host |
| Hindi ह | %E0%A4%B9 | Non-ASCII UTF-8 encoding |
encodeURIComponent vs encodeURI — Which to Use?
JavaScript has two URL encoding functions:
- encodeURIComponent() — encodes everything except letters, digits, and
-_.!~*'(). Use this to encode individual query parameter values. - encodeURI() — does NOT encode reserved characters like
/,?,#,&,=. Use this to encode a complete URL while preserving its structure.
- Input:
hello world&name=John - encodeURIComponent:
hello%20world%26name%3DJohn(encodes & and =) - encodeURI:
hello%20world&name=John(preserves & and =)
Rule: Use encodeURIComponent() for values inside query strings. Use encodeURI() for the full URL.
How to Use the Tool (Step by Step)
- 1
Open the URL Encode & Decode Tool
Go to ToolsArena URL Encode & Decode — no login needed.
- 2
Paste your URL or text
Enter the text or URL you want to encode or decode.
- 3
Choose Encode or Decode
Select "Encode" to percent-encode special characters, or "Decode" to convert %XX sequences back to characters.
- 4
Copy the result
Copy the encoded URL to use in your application, or copy the decoded text to read the original content.
- 5
Use the full URL or query parameter
Paste the encoded string into your URL, API request, or HTML form action.
Frequently Asked Questions
What does %20 mean in a URL?+−
%20 is the percent-encoded representation of a space character. URLs cannot contain spaces — they must be encoded as %20 (or + in HTML form data). For example, "New York" in a URL becomes "New%20York".
What is the difference between URL encoding and HTML encoding?+−
URL encoding (percent-encoding) converts characters to %XX format for use in URLs. HTML encoding converts special characters to HTML entities (e.g., & becomes &amp;, < becomes &lt;) for safe display in HTML. They are used in different contexts and have different character sets.
Why does my URL have %2F or %3A in it?+−
%2F is an encoded forward slash (/) and %3A is an encoded colon (:). These appear when these characters are used as data values inside query parameters, not as URL structure characters. For example, a URL like https://api.example.com/redirect?url=https%3A%2F%2Fgoogle.com encodes the target URL to distinguish it from the main URL structure.
How do I encode a URL with Hindi or Nepali text?+−
Non-ASCII characters (like Hindi देवनागरी or Nepali text) are first encoded as UTF-8 bytes, then each byte is percent-encoded. For example, the Hindi character "अ" (U+0905) encodes to UTF-8 bytes E0 A4 85, giving the URL encoding %E0%A4%85. Use ToolsArena's URL encoder to handle this automatically.
Should I use + or %20 for spaces in URLs?+−
Use %20 in the path portion of a URL (e.g., /my%20page). Use + for spaces in query string values in HTML form submissions (application/x-www-form-urlencoded format). In practice, modern servers handle both. When in doubt, use %20 — it is unambiguous and works everywhere.
Free URL Encoder & Decoder — Percent-Encode Any Text or URL
Encode special characters for URLs or decode percent-encoded strings back to readable text. Works for any language including Hindi, Nepali, and Chinese.
Encode / Decode URLRelated Guides
Base64 Encode & Decode — What It Is, How It Works & When to Use It
Developer guide to Base64 encoding: use cases, online decoder, and common pitfalls
JSON Formatter Guide
A complete developer reference for JSON syntax, common errors, formatting options, and how to validate JSON in any language or tool.
Strong Password Guide
NIST 2024 guidelines, time-to-crack tables, and the right way to manage passwords.