Generate legacy %uXXXX escape sequences
This page starts in Unicode mode. Each UTF-16 code unit becomes a %uXXXX sequence, including ordinary letters and punctuation. For example, a.b becomes %u0061%u002E%u0062, and é becomes %u00E9.
Characters outside the basic multilingual plane use two UTF-16 code units. The emoji 😀 becomes %uD83D%uDE00. This output is useful when reproducing a legacy system's input format.
Use UTF-8 percent encoding for standard URL components
The legacy %uXXXX notation is not standard URL percent encoding. For modern query values and path segments, select Standard mode or open the URL encoder. In standard mode, é becomes %C3%A9, its UTF-8 bytes.
The URL decoder accepts both formats. Compare the output expected by your receiving application before choosing a mode. The browser's standard encodeURIComponent function uses percent-encoded UTF-8, rather than %u sequences.
Common questions
- Is %uXXXX standard URL encoding?
- No. It is a legacy notation for UTF-16 code units. Standard URL component encoding represents UTF-8 bytes as %XX sequences.
- Why does an emoji produce two %u sequences?
- Many emoji require a UTF-16 surrogate pair. Unicode mode emits one %uXXXX sequence for each code unit.