UTF-32 Encoding Guide
UTF-32 Encoding Guide
A fixed four-byte encoding where every code point takes the same amount of space.
One code point, four bytes
UTF-32 stores every Unicode code point as exactly four bytes. U+0041 is 00000041, U+20AC is 000020AC, and U+1F600 is 0001F600.
The fixed width makes indexing simple, but it uses four bytes even for ASCII characters.
00 00 00 4100 00 20 AC00 01 F6 00When UTF-32 makes sense
UTF-32 is useful when random access by code point matters and memory is not the main constraint, such as in some database or API internals.
For stored text, files, and the web, UTF-8 is usually smaller and more interoperable.
Comparing encodings
The same text has different byte sizes in each encoding: ASCII text is 1 byte per character in UTF-8 but 4 in UTF-32, while an emoji is 4 bytes in both.
This hub lists UTF-8 and UTF-16 on character pages because those are the forms most developers copy directly.