ByteBox / Tools / URL Encoder

URL Encoder & Decoder

Safely encode and decode URLs and query parameters instantly in your browser.

Last updated: Mar 15, 2026
Plain String
Encoded URL

        

URL Encoding Explained

URL encoding, officially known as percent-encoding, replaces unsafe ASCII characters with a % followed by two hexadecimal digits. For example, a space character becomes %20. This tool uses JavaScript's native encodeURIComponent (which preserves the :/?#[]@ URl structure) for encoding and decodeURIComponent for decoding.

Reserved vs Unreserved Characters

In the URI specification, characters are either "reserved" (they have special meaning, like ? or &) or "unreserved" (like letters and numbers). When you need to transmit data that contains reserved characters within a query parameter, you must percent-encode it so the server doesn't misinterpret the structure of the URL.

Example

Unencoded: https://api.example.com/search?q=hello world!&lang=en
Encoded:   https://api.example.com/search?q=hello%20world!&lang=en