URL Encoder
What is URL Encoder
URL encoding (also called percent-encoding) converts characters that are not allowed in URLs into a safe format. Spaces, ampersands, accented letters, and special symbols are replaced with a percent sign followed by their hexadecimal code. For example, a space becomes %20 and an ampersand becomes %26. This tool uses JavaScript's encodeURIComponent, which encodes everything except letters, digits, and the characters - _ . ! ~ * ' ( ).
How to use
- Type or paste the text you want to encode into the input field.
- The URL-encoded result appears instantly in the output area.
- Click Copy to copy the encoded string to your clipboard.
- Use the URL Decoder link below to reverse the operation.
When to use it
Need to drop user input into a query string without it breaking? Paste the raw text and you get a safe value like 'search%3F%26query%3Dhello%20world' back, no manual escaping of special characters required. Any browser or server will parse it correctly, so your links and API calls stay intact.
Frequently asked questions
What is URL encoding?
URL encoding replaces unsafe characters in a URL with a percent sign followed by two hexadecimal digits. This ensures the URL is valid and interpreted correctly by browsers and servers regardless of special characters.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URL and leaves characters like /, ?, and # intact. encodeURIComponent (used here) encodes a single value meant to appear inside a query string, so it also encodes those characters. Use encodeURIComponent for individual parameter values.
Does this encoder handle Unicode and emoji?
Yes. Characters outside ASCII are first converted to UTF-8 bytes, then each byte is percent-encoded. So 'cafe' with an accent becomes 'caf%C3%A9' and emoji are encoded as multi-byte sequences.
Is space encoded as %20 or as a plus sign?
This tool uses encodeURIComponent, which encodes spaces as %20. Some older form encodings use + instead, but %20 is the correct form for query string values in modern APIs.
Can I share this tool with my inputs pre-filled?
Yes. The URL updates automatically as you type. Copy it from the address bar or use the Share button — anyone who opens the link will see your exact inputs ready to go.
Related tools
URL Decoder
Decode any percent-encoded URL or query string back to readable text instantly. Free online URL decoder tool.
AES Text Decryption
Decrypt AES-256 encrypted text with your password in your browser. Free, private, and fully offline. No data leaves your device.
AES Text Encryption
Encrypt text with a password using AES-256 in your browser. Free, private, and fully offline. Nothing is sent to a server.