URL Encode ASCII Online
URL-encode ASCII text using percent-encoding. Convert special characters to their %XX representations for safe use in URLs.
Paste your text, pick an encoding mode, and get percent-encoded output ready to drop into URLs. Standard keeps URL structure characters like slashes and colons intact, Component escapes anything that would break a query string, and Full percent-encodes every byte. And everything runs in your browser. Nothing gets uploaded.
How to Use
Enter your text in the left panel. You can type, paste, or click Sample for example text.
Choose an encoding mode: Standard encodes only special characters, Component uses encodeURIComponent, and Full encodes every character.
Click Encode or leave Live mode enabled for real-time encoding as you type.
Copy, Download, or Swap the result. Swap decodes the URL-encoded output back to plain text.
Frequently Asked Questions
What is URL encoding (percent-encoding)?
URL encoding, also known as percent-encoding, is a method of representing special characters in a URL by replacing them with a percent sign (%) followed by their two-digit hexadecimal ASCII value. For example, a space becomes %20, an ampersand becomes %26, and a question mark becomes %3F. This ensures URLs are transmitted correctly without ambiguity, since certain characters have special meaning in URL syntax.
What is the difference between Standard, Component, and Full encoding?
Standard mode uses JavaScript's encodeURI, which encodes special characters but preserves URL-safe characters like : / ? # [ ] @ ! $ & ' ( ) * + , ; =. Component mode uses encodeURIComponent, which encodes everything except letters, digits, and - _ . ~, making it ideal for encoding query parameter values. Full mode percent-encodes every single character, including letters and digits, which is useful for obfuscation or certain protocol requirements.
When should I use encodeURIComponent vs encodeURI?
Use encodeURIComponent (Component mode) when encoding a value that will be placed inside a URL query parameter, form field, or path segment. Use encodeURI (Standard mode) when encoding an entire URL string and you want to preserve the URL structure characters like colons, slashes, and question marks. For example, encoding "price=10&name=John Doe" as a query value needs Component mode so the & and = inside the value do not break the URL structure.
Does this tool handle non-ASCII characters?
Yes. While this tool is optimized for ASCII text, it also handles Unicode characters. Non-ASCII characters are first encoded to their UTF-8 byte sequences, and then each byte is percent-encoded. For example, the euro sign is encoded as %E2%82%AC (three UTF-8 bytes). This follows the standard behavior defined in RFC 3986.
Can I decode URL-encoded text back to plain text?
Yes. Click the Swap button to move the encoded output into the input panel and switch to decode mode. The tool will then use decodeURIComponent to convert percent-encoded sequences back to their original characters. You can also use the dedicated URL Encode/Decode tool for decoding.