UTF-32 Encoder Decoder
Encode Unicode text into UTF-32LE or UTF-32BE hexadecimal, decimal or binary bytes, or decode UTF-32 byte sequences back into Unicode text. Inspect 32-bit code units, byte order, Unicode code points and Byte Order Marks with strict Unicode scalar-value validation.
—
—
—
UTF-32 Encoder Decoder
The UTF-32 Encoder Decoder converts Unicode text into UTF-32 byte sequences and converts valid UTF-32 byte data back into Unicode text. The tool supports both UTF-32 little-endian and UTF-32 big-endian byte order as well as optional Byte Order Mark handling.
Unlike UTF-8 and UTF-16, UTF-32 uses a fixed-width representation for Unicode scalar values. Every valid Unicode code point is stored in one 32-bit code unit, which occupies four bytes.
The converter can display those bytes in hexadecimal, decimal or binary form while also showing the original Unicode code points, total byte count, bit count, byte order and BOM status.
How to Encode Text to UTF-32
Select Encode Text → UTF-32, choose UTF-32LE or UTF-32BE and enter the Unicode text you want to convert. Select a byte format for the primary result and optionally include a Byte Order Mark.
Each Unicode scalar value is converted directly into a 32-bit integer. The four bytes of that integer are then arranged according to the selected byte order.
Text:
ABC
UTF-32LE:
41 00 00 00 42 00 00 00 43 00 00 00
UTF-32BE:
00 00 00 41 00 00 00 42 00 00 00 43How to Decode UTF-32 Bytes
Select Decode UTF-32 → Text, choose hexadecimal, decimal or binary input and specify the expected byte order. Every UTF-32 code unit must contain exactly four bytes, so the total byte count must be divisible by four.
UTF-32LE:
AC 20 00 00
Decoded:
€
Unicode:
U+20ACThe decoder rejects values above U+10FFFF and values in the surrogate range U+D800 through U+DFFF because those numbers are not valid Unicode scalar values.
UTF-32LE vs UTF-32BE
UTF-32 represents each Unicode scalar value using 32 bits. The numeric value remains the same in both endian formats, but the four bytes appear in a different order.
| Character | Unicode | UTF-32LE | UTF-32BE |
|---|---|---|---|
| A | U+0041 | 41 00 00 00 | 00 00 00 41 |
| € | U+20AC | AC 20 00 00 | 00 00 20 AC |
| 😀 | U+1F600 | 00 F6 01 00 | 00 01 F6 00 |
Selecting the wrong endianness when decoding changes the numeric value constructed from the four input bytes and usually produces invalid or unrelated Unicode code points.
UTF-32 Byte Order Mark
A UTF-32 stream may begin with a Byte Order Mark to indicate its byte order. The underlying Unicode value is U+FEFF.
UTF-32LE BOM:
FF FE 00 00
UTF-32BE BOM:
00 00 FE FFWhen BOM detection is enabled in decode mode, this converter recognizes either marker, selects the appropriate byte order and removes the BOM before decoding the remaining code points.
UTF-32 Code Units Explained
A UTF-32 code unit is 32 bits wide. Since Unicode currently defines scalar values only through U+10FFFF, a significant portion of the 32-bit numeric range is unused.
Character:
€
Unicode:
U+20AC
32-bit value:
000020AC
UTF-32BE bytes:
00 00 20 AC
UTF-32LE bytes:
AC 20 00 00This fixed-width design makes code-point indexing simpler than in variable-length encodings, although it generally consumes more storage.
UTF-32 Encoding Example for ASCII
ASCII characters still occupy four bytes when encoded in UTF-32. For example, the letter A has Unicode code point U+0041.
Character:
A
Unicode:
U+0041
UTF-32 value:
00000041
UTF-32LE:
41 00 00 00
UTF-32BE:
00 00 00 41
Storage:
4 bytesUTF-32 Encoding Example for the Euro Sign
The euro sign has Unicode code point U+20AC. UTF-32 stores the numeric code point directly inside one 32-bit unit.
Character:
€
Unicode:
U+20AC
32-bit value:
000020AC
UTF-32LE:
AC 20 00 00
UTF-32BE:
00 00 20 AC
Bytes:
4UTF-32 Encoding Example for Emoji
UTF-32 does not require surrogate pairs for supplementary Unicode characters. The grinning face emoji U+1F600 is stored directly as the 32-bit integer 0001F600.
Character:
😀
Unicode:
U+1F600
UTF-32 value:
0001F600
UTF-32LE:
00 F6 01 00
UTF-32BE:
00 01 F6 00
Bytes:
4UTF-32 Does Not Use Surrogate Pairs
UTF-16 requires surrogate pairs for code points above U+FFFF because a single 16-bit unit cannot hold the complete numeric value. UTF-32 has enough bits to store every Unicode scalar value directly.
😀 U+1F600
UTF-16:
D83D DE00
Two code units
UTF-32:
0001F600
One code unitSurrogate values themselves are nevertheless prohibited as standalone UTF-32 characters. Values from U+D800 through U+DFFF are reserved for UTF-16’s surrogate mechanism and are not Unicode scalar values.
UTF-32 vs UTF-8 vs UTF-16
UTF-8, UTF-16 and UTF-32 represent the same Unicode character set but use different encoding strategies. Their storage size for a particular character can therefore differ significantly.
| Character | Unicode | UTF-8 Bytes | UTF-16 Units | UTF-32 Unit |
|---|---|---|---|---|
| A | U+0041 | 41 | 0041 | 00000041 |
| € | U+20AC | E2 82 AC | 20AC | 000020AC |
| 😀 | U+1F600 | F0 9F 98 80 | D83D DE00 | 0001F600 |
UTF-8 is variable length from one to four bytes. UTF-16 uses one or two 16-bit code units. UTF-32 uses exactly one four-byte code unit for each Unicode scalar value.
UTF-32 Hexadecimal, Decimal and Binary
Hexadecimal, decimal and binary output are different ways to display the same UTF-32 bytes. Changing the display format does not alter the encoded data.
UTF-32LE for A:
Hexadecimal:
41 00 00 00
Decimal:
65 0 0 0
Binary:
01000001 00000000 00000000 00000000Hexadecimal is commonly used for debugging binary data, decimal values can be convenient when working with byte arrays, and binary output makes the full eight-bit value of every byte visible.
Why UTF-32 Uses Four Bytes per Code Point
UTF-32 uses a fixed-width 32-bit code unit so that every Unicode scalar value can be represented directly without multi-unit sequences. Consequently, ordinary ASCII text consumes considerably more space in UTF-32 than in UTF-8.
Text:
ABC
UTF-8 size:
3 bytes
UTF-32 size:
12 bytes
Each UTF-32 code point:
4 bytesThe advantage is predictable code-unit size. The tradeoff is increased memory or file size for many kinds of text.
Unicode Scalar Value Validation
Not every possible 32-bit integer is a valid Unicode character. A valid Unicode scalar value must be between U+0000 and U+10FFFF and must not fall within the surrogate range from U+D800 through U+DFFF.
Valid:
U+0041
U+20AC
U+1F600
U+10FFFF
Invalid UTF-32 scalar values:
U+D800
U+DFFF
U+110000
FFFFFFFFThe decoder validates each reconstructed 32-bit code unit and returns an error if it represents a surrogate or a number beyond the Unicode maximum.
Common Uses for a UTF-32 Encoder Decoder
A UTF-32 converter is useful when inspecting Unicode-oriented binary data, studying character encoding, debugging applications that use 32-bit code-point arrays or analyzing file and protocol structures.
It can also help compare UTF-8, UTF-16 and UTF-32 representations, verify endian order, inspect Unicode scalar values, understand BOM signatures and troubleshoot encoded hexadecimal data.
Typical technical scenarios
Examples include analyzing binary dumps, verifying serialization formats, inspecting encoded text produced by software libraries, learning Unicode internals, checking cross-platform byte order and testing data that claims to contain UTF-32 text.
Common UTF-32 Encoding Mistakes
A common mistake is assuming that UTF-32 byte order does not matter. Although each character has one 32-bit value, that value still consists of four bytes whose storage order depends on endianness.
Another mistake is accepting every 32-bit integer as a valid character. Values above U+10FFFF and UTF-16 surrogate values are not valid Unicode scalar values and must be rejected.
It is also easy to confuse the Unicode code-point notation U+1F600 with the physical UTF-32 byte order. U+1F600 identifies the numeric code point, while UTF-32LE stores it as 00 F6 01 00 and UTF-32BE stores it as 00 01 F6 00.
UTF-32 Encoder Decoder Limitations and Notes
The converter works at the Unicode code-point level. A single visible grapheme may contain multiple Unicode code points. Complex emoji, combining accents, flag sequences and zero-width-joiner sequences are common examples.
Each underlying code point therefore produces its own four-byte UTF-32 code unit even when several code points combine visually into one symbol.
The tool does not normalize Unicode text. It encodes the exact sequence of code points supplied so that byte-level comparisons remain accurate.