URL Encoder/Decoder
Encode and decode URL strings safely
Text → URL Encoded
URL Encoded → Text
About URL Encoding
- • URL encoding replaces unsafe ASCII characters with % followed by hex digits
- • Spaces become %20, special characters are converted to %XX format
- • Essential for passing data through URLs safely
- • Also known as percent-encoding or application/x-www-form-urlencoded
Understanding URL Encoding
URL encoding (also known as percent-encoding) converts characters into a format that can be safely transmitted in a URL. Since URLs can only contain a limited set of ASCII characters, special characters like spaces, ampersands, and non-ASCII characters must be encoded using a percent sign (%) followed by two hexadecimal digits.
When Do You Need URL Encoding?
- Query Parameters: Values in URL query strings (after the ?) must be encoded to avoid conflicts with URL syntax characters like & and =.
- Form Submissions: HTML forms with method=GET encode field values in the URL automatically.
- API Requests: When building API URLs programmatically, user-provided values must be encoded to prevent injection or malformed requests.
- Internationalization: Non-ASCII characters (Chinese, Japanese, emoji) in URLs are encoded as UTF-8 byte sequences.
Common Examples
Space becomes %20 (or + in form data), the ampersand & becomes %26, and the equals sign = becomes %3D. This tool handles the encoding and decoding automatically, processing everything locally in your browser.