URL Encoder / Decoder
Percent-encode special characters in URLs or decode encoded strings back to human-readable text. Instant and free.
How to Use
Paste Your Text or URL
Type or paste any URL, query string, or text containing special characters into the Input field. The character count updates automatically as you type.
Encode or Decode
Click "Encode URL" to percent-encode special characters (spaces become %20, & becomes %26, etc.). Click "Decode URL" to convert an already-encoded URL back into a human-readable string.
Use Real-Time Mode (Optional)
Enable "Encode as you type" to automatically encode your input on every keystroke. This is useful when building URLs dynamically and you want to see the encoded form immediately.
Copy the Result
Click the "Copy" button next to the output area to copy the encoded or decoded result to your clipboard. You can then paste it directly into your code, browser address bar, or wherever you need it.
Frequently Asked Questions
URL encoding (also called percent-encoding) is a method of representing special characters in a URL using a percent sign followed by two hexadecimal digits. For example, a space becomes %20, an ampersand becomes %26, and a forward slash becomes %2F. It ensures that URLs remain valid across all systems, browsers, and servers.
You should encode a URL whenever it contains characters that have special meaning in URL syntax (like &, ?, =, #) or characters that are not allowed in URLs (like spaces, non-ASCII characters, and certain punctuation). This is especially important when passing user-generated text as query parameters, embedding URLs in HTML, or making HTTP requests programmatically.
Characters that must be encoded include spaces, non-ASCII characters (like accented letters or Chinese characters), and reserved characters with special URL meaning: ! # $ & ' ( ) * + , / : ; = ? @ [ ]. Safe characters that do not need encoding are letters (A–Z, a–z), digits (0–9), and the symbols - _ . ~.
encodeURI() encodes a complete URL but leaves characters that are valid URL delimiters unencoded (like / ? & = # :). encodeURIComponent() — which this tool uses — encodes everything except letters, digits, and - _ . ! ~ * ' ( ). Use encodeURIComponent when encoding a value that will be inserted into a URL as a query parameter, so that delimiters in the value do not break the URL structure.
This tool encodes or decodes the entire content of the input box as a single string. To process multiple URLs, paste them one at a time, or separate them with a delimiter that will not interfere with the encoding. For bulk URL processing, consider using a script with JavaScript's decodeURIComponent() function in a loop.