URL Encode
Convert any text into a URL-safe percent-encoded string. Useful for query parameters, form data, and API requests.
URL TOOLS
Encodes special characters using percent-encoding (encodeURIComponent). Safe for use in query string values.
How it works
The tool passes your text to encodeURIComponent. Each character outside A-Z, a-z, 0-9 and - _ . ! ~ * ' ( ) is converted to its UTF-8 bytes, and each byte is written as % plus two uppercase hex digits, so a space becomes %20 and é becomes %C3%A9. The output updates as you type.
Processing runs in your browser
All encoding, decoding, and parsing happens inside your browser tab. Our servers are not involved at any point. You can see this yourself in your browser's DevTools Network tab.
Technical specification
Percent-encoding (URL encoding) is defined in RFC 3986 §2.1 (IETF, 2005). Each octet is written as % followed by two uppercase hexadecimal digits. Unreserved characters (A-Z, a-z, 0-9, -._~) never need encoding, and reserved characters (:/?#[]@!$&'()*+,;=) are encoded when they appear inside a value. This tool uses JavaScript's encodeURIComponent and decodeURIComponent, defined in the ECMAScript standard (ECMA-262). encodeURIComponent also leaves ! ' ( ) * as they are, so a system that expects strict RFC 3986 output may need those five escaped. Query string parsing uses URLSearchParams from the WHATWG URL Standard, which reads + as a space.
- Standard
- RFC 3986. Uniform Resource Identifier (URI): Generic Syntax
- Encoding unit
- One octet →
%XX(two uppercase hex digits) - Space encoding
%20per RFC 3986;+in HTML form data (RFC 1866)- Browser API
encodeURIComponent()/URLSearchParams
Related operations
To encode binary blobs as text, try Base64. For escaping reserved markup characters, use HTML entities. To inspect the encoded query body of a JSON request, see the JSON formatter.
Frequently asked questions
- What is URL encoding?
- URL encoding (percent-encoding) replaces unsafe characters with a % followed by two hex digits, e.g. space becomes %20.
- What's the difference between encodeURI and encodeURIComponent?
- encodeURIComponent encodes all special characters including & = +, use it for individual values. encodeURI leaves URL-structural characters like / ? & intact.
- Is my data sent to a server?
- All processing runs in your browser using JavaScript's built-in encodeURIComponent.
- Which characters are left unencoded?
- encodeURIComponent keeps letters, digits, and - _ . ! ~ * ' ( ) as they are. Everything else is encoded, including spaces, &, =, /, ?, #, and every non-ASCII character, which becomes its UTF-8 bytes (é becomes %C3%A9).
Last reviewed September 30, 2026
Other pages for this tool
Related tools
- Background reading: Complete guide to data tools