Encode and decode URLs and query strings. Convert special characters for safe URL transmission.
URL encoding (percent-encoding) converts special characters into a format safe for transmission in URLs. Characters like spaces, ampersands, and question marks are replaced with a percent sign followed by two hex digits (e.g., space → %20).
0 characters
| Char | Encoded | Usage |
|---|---|---|
| Space | %20 | Most common encoding |
| ! | %21 | Exclamation mark |
| # | %23 | Hash/pound (fragment) |
| $ | %24 | Dollar sign |
| & | %26 | Ampersand (query separator) |
| ' | %27 | Single quote |
| ( | %28 | Open parenthesis |
| ) | %29 | Close parenthesis |
| + | %2B | Plus sign |
| , | %2C | Comma |
| / | %2F | Forward slash (path) |
| : | %3A | Colon (protocol) |
| = | %3D | Equals (query value) |
| ? | %3F | Question mark (query start) |
| @ | %40 | At sign |
Encoding: Converts unsafe characters to percent-encoded format using encodeURIComponent(). This encodes all characters except A-Z, a-z, 0-9, and - _ . ! ~ * ' ( ).
Decoding: Converts percent-encoded sequences back to their original characters using decodeURIComponent().
100% Client-Side: All processing happens in your browser. Your data never leaves your device.
Formula
encoded = '%' + hex(byte1) + hex(byte2) per UTF-8 byte% = Percent sign prefix for each encoded byte sequence
hex(byte) = Two uppercase hexadecimal digits representing the byte value
UTF-8 byte = Non-ASCII characters may require 2–4 bytes each
Worked Example
Encoding "café"
Did you know? Percent-encoding (URL encoding) was first defined in RFC 1738 in 1994. The modern standard, RFC 3986, reserves 18 characters with special URL meaning — all others must be percent-encoded when used as data values.
Sources
Convert text to ASCII codes and back. Supports decimal, hex, binary, and octal formats.
Convert width/height to aspect ratios, scale dimensions, and generate responsive embed CSS for any layout.
Calculate required internet bandwidth based on devices and activities in your household.
Encode and decode Base64 strings. Convert text for data URIs, APIs, and safe data transmission.
Create CSS border-radius with visual controls for each corner. Generate circles, pills, and custom shapes.
Create CSS box shadows with multiple layers, live preview, and copy-ready code.