Skip to main content
32-Bit Fixed-Width Encoding Form Unicode Standard 17.0 §3.8 & §3.9 ISO/IEC 10646

UTF-32 Encoding

UTF-32 (32-bit Unicode Transformation Format) is the fixed-width character encoding form that maps each Unicode scalar value to exactly one 32-bit code unit (4 bytes). In UTF-32, the numerical value of the 32-bit code unit is identically equal to the scalar value. Because it uses a 32-bit integer for every scalar value, UTF-32 requires no variable-width surrogates; however, surrogate code points (U+D800U+DFFF) and values above U+10FFFF are strictly invalid.

Technical Quick Facts

Code Unit Size 32 bits (4 Bytes) Fundamental unit of the encoding form
Units per Scalar Value Exactly 1 Code Unit Direct 1:1 scalar-to-unit mapping
Serialized Bytes per Scalar 4 Bytes (Serialized) Always 4 bytes in byte streams
Valid Scalar Ranges U+0000–U+D7FF & U+E000–U+10FFFF 1,112,064 total valid scalar values
Surrogate Code Points U+D800–U+DFFF (Prohibited) Not scalar values; rejected in UTF-32
Endianness Schemes UTF-32BE / UTF-32LE Big-Endian and Little-Endian byte streams
Byte Order Mark (BOM) Optional (U+FEFF) BE: 00 00 FE FF | LE: FF FE 00 00
Fixed Width Nuance Fixed per Scalar Only Multi-scalar graphemes require >1 unit

Unicode Codespace & Valid Scalar Ranges

The Unicode codespace consists of $1,114,112$ code points ($U+0000$ to $U+10FFFF$). In UTF-32, every valid Unicode scalar value maps to exactly one 32-bit code unit (4 bytes). Surrogate code points ($U+D800$ to $U+DFFF$) and values exceeding $U+10FFFF$ are strictly prohibited by Unicode Standard 17.0 (§3.8 & §3.9).

Codespace Section Scalar Range Code Units Byte Length UTF-32 Code Unit Range (Hex) Conformance Status
Basic Multilingual Plane (BMP, Lower)
Contains ASCII, Latin, Greek, Cyrillic, Hebrew, Arabic, and most world scripts.
U+0000–U+D7FF 1 Code Unit 4 Bytes 00000000–0000D7FF Valid Scalar Range
High & Low Surrogate Range (Reserved)
Reserved exclusively for UTF-16 surrogate pairs. Surrogates are NOT Unicode scalar values.
U+D800–U+DFFF 0 Units (Prohibited) 0000D800–0000DFFF Prohibited (Surrogates)
Basic Multilingual Plane (BMP, Upper)
Private Use Area, CJK compatibility, alphabetic presentation forms, and specials.
U+E000–U+FFFF 1 Code Unit 4 Bytes 0000E000–0000FFFF Valid Scalar Range
Supplementary Planes (Planes 1–16)
Emojis, historic scripts (Linear B, Egyptian Hieroglyphs), musical symbols, rare CJK ideographs.
U+10000–U+10FFFF 1 Code Unit 4 Bytes 00010000–0010FFFF Valid Scalar Range
Outside Unicode Codespace
Values exceeding U+10FFFF are outside the Unicode codespace and cannot be represented in UTF-32.
> U+10FFFF 0 Units (Prohibited) 00110000–FFFFFFFF Prohibited (Out of Codespace)

UTF-32 32-Bit Code Unit Architecture

Unlike UTF-8 (1–4 bytes) or UTF-16 (2 or 4 bytes), UTF-32 is fixed-width at the code-unit level. The Unicode scalar value U+1F600 (😀) maps directly to 32-bit code unit 0001F600, which serializes into four 8-bit bytes.

Unicode Scalar Value: 😀 (U+1F600) Plane 1 (SMP - Supplementary Multilingual Plane)
32-Bit Code Unit (In-Memory Integer)
0001F600 Bits 31 .. 0 (32 bits)
00000000 00000001 11110110 00000000
UTF-32BE (Big-Endian) Most Significant Byte First ($B_0 \to B_3$)
B₀ (Bits 31..24) 00
B₁ (Bits 23..16) 01
B₂ (Bits 15..8) F6
B₃ (Bits 7..0) 00
Serialized Bytes: 00 01 F6 00
UTF-32LE (Little-Endian) Least Significant Byte First ($B_0 \to B_3$)
B₀ (Bits 7..0) 00
B₁ (Bits 15..8) F6
B₂ (Bits 23..16) 01
B₃ (Bits 31..24) 00
Serialized Bytes: 00 F6 01 00

Interactive UTF-32 Inspector & Validator

Inspect any text or character in real time to view its exact 32-bit code units, toggle between Big-Endian and Little-Endian byte serializations, or input raw hexadecimal code units to validate conformance.

Quick Presets:
Display Format:
Code Points: 1
32-Bit Code Units: 1
Serialized Bytes: 4
Grapheme Clusters: 1
Hexadecimal UTF-32 Code Units:
0001F600
😀 U+1F600
Supplementary Multilingual Plane 1 Code Unit (4 Bytes)
32-Bit Code Unit: 0001F600
BE Bytes: 00 01 F6 00
LE Bytes: 00 F6 01 00

Curated UTF-32 Character Examples Across Planes

Representative Unicode characters, mathematical symbols, historic scripts, combining marks, and complex emoji sequences encoded in UTF-32.

A

Latin Capital Letter A

Plane 0 (BMP) • Basic ASCII
Scalar Value: U+0041
UTF-32 Code Unit: 00000041
UTF-32BE Bytes: 00 00 00 41
UTF-32LE Bytes: 41 00 00 00
1 Code Unit 4 Bytes 1 Grapheme

Standard ASCII character; numeric value 65 maps identically to code unit 00000041.

é

Latin Small Letter E with Acute

Plane 0 (BMP) • Latin-1 Supplement
Scalar Value: U+00E9
UTF-32 Code Unit: 000000E9
UTF-32BE Bytes: 00 00 00 E9
UTF-32LE Bytes: E9 00 00 00
1 Code Unit 4 Bytes 1 Grapheme

Precomposed accented letter. In UTF-32, directly encoded as 000000E9.

Euro Sign

Plane 0 (BMP) • Currency Symbols
Scalar Value: U+20AC
UTF-32 Code Unit: 000020AC
UTF-32BE Bytes: 00 00 20 AC
UTF-32LE Bytes: AC 20 00 00
1 Code Unit 4 Bytes 1 Grapheme

Requires 3 bytes in UTF-8 and 2 bytes in UTF-16, but exactly 4 bytes in UTF-32.

Infinity

Plane 0 (BMP) • Mathematical Operators
Scalar Value: U+221E
UTF-32 Code Unit: 0000221E
UTF-32BE Bytes: 00 00 22 1E
UTF-32LE Bytes: 1E 22 00 00
1 Code Unit 4 Bytes 1 Grapheme

Mathematical operator represented as code unit 0000221E.

😀

Grinning Face

Plane 1 (SMP) • Emoji & Pictographs
Scalar Value: U+01F600
UTF-32 Code Unit: 0001F600
UTF-32BE Bytes: 00 01 F6 00
UTF-32LE Bytes: 00 F6 01 00
1 Code Unit 4 Bytes 1 Grapheme

Supplementary plane emoji. Unlike UTF-16 surrogate pairs, UTF-32 uses exactly 1 code unit (0001F600).

𐂃

Linear B Ideogram B105F Mare

Plane 1 (SMP) • Historic Scripts
Scalar Value: U+010083
UTF-32 Code Unit: 00010083
UTF-32BE Bytes: 00 01 00 83
UTF-32LE Bytes: 83 00 01 00
1 Code Unit 4 Bytes 1 Grapheme

Ancient Mediterranean script in Plane 1, encoded as 00010083.

𪚥

CJK Unified Ideograph-2A6A5

Plane 2 (SIP) • CJK Extension B
Scalar Value: U+02A6A5
UTF-32 Code Unit: 0002A6A5
UTF-32BE Bytes: 00 02 A6 A5
UTF-32LE Bytes: A5 A6 02 00
1 Code Unit 4 Bytes 1 Grapheme

Rare 64-stroke Chinese ideograph (dragon quadruple), represented as 0002A6A5.

e + Combining Acute Accent

Plane 0 (BMP) • Combining Sequence
Scalar Value: U+0065 + U+0301
UTF-32 Code Unit: 00000065 00000301
UTF-32BE Bytes: 00 00 00 65 00 00 03 01
UTF-32LE Bytes: 65 00 00 00 01 03 00 00
2 Code Units 8 Bytes 1 Grapheme

Decomposed grapheme cluster: 2 scalars = 2 UTF-32 units (8 bytes), displaying as 1 visible letter.

👩‍💻

Woman Technologist

Plane 1 & Plane 0 • Emoji ZWJ Sequence
Scalar Value: U+01F469 + U+200D + U+01F4BB
UTF-32 Code Unit: 0001F469 0000200D 0001F4BB
UTF-32BE Bytes: 00 01 F4 69 00 00 20 0D 00 01 F4 BB
UTF-32LE Bytes: 69 F4 01 00 0D 20 00 00 BB F4 01 00
3 Code Units 12 Bytes 1 Grapheme

Comprises 3 scalars: Woman (U+1F469), ZWJ (U+200D), and Laptop (U+1F4BB) = 3 units (12 bytes).

Null Character

Plane 0 (BMP) • Control Code
Scalar Value: U+0000
UTF-32 Code Unit: 00000000
UTF-32BE Bytes: 00 00 00 00
UTF-32LE Bytes: 00 00 00 00
1 Code Unit 4 Bytes 1 Grapheme

Lowest valid scalar value in Unicode. Encodes as 00000000.

U+D7FF

Last BMP Pre-Surrogate Code Point

Plane 0 (BMP) • Hangul Jamo Extended-B
Scalar Value: U+D7FF
UTF-32 Code Unit: 0000D7FF
UTF-32BE Bytes: 00 00 D7 FF
UTF-32LE Bytes: FF D7 00 00
1 Code Unit 4 Bytes 1 Grapheme

Highest scalar value immediately before the reserved surrogate range. Encodes as 0000D7FF.

U+E000

First BMP Post-Surrogate Code Point

Plane 0 (BMP) • Private Use Area
Scalar Value: U+E000
UTF-32 Code Unit: 0000E000
UTF-32BE Bytes: 00 00 E0 00
UTF-32LE Bytes: 00 E0 00 00
1 Code Unit 4 Bytes 1 Grapheme

Lowest scalar value immediately following the surrogate range. Encodes as 0000E000.

U+FFFF

BMP Noncharacter

Plane 0 (BMP) • Special / Noncharacter
Scalar Value: U+FFFF
UTF-32 Code Unit: 0000FFFF
UTF-32BE Bytes: 00 00 FF FF
UTF-32LE Bytes: FF FF 00 00
1 Code Unit 4 Bytes 1 Grapheme

Valid Unicode scalar value reserved for internal processing. Fully encodable as 0000FFFF.

U+10000

Linear B Syllable B008 A

Plane 1 (SMP) • Supplementary Start
Scalar Value: U+010000
UTF-32 Code Unit: 00010000
UTF-32BE Bytes: 00 01 00 00
UTF-32LE Bytes: 00 00 01 00
1 Code Unit 4 Bytes 1 Grapheme

First scalar value of the Supplementary Planes. Encodes cleanly as 00010000.

U+10FFFF

Maximum Unicode Codespace Limit

Plane 16 (SSP) • Special / Noncharacter
Scalar Value: U+10FFFF
UTF-32 Code Unit: 0010FFFF
UTF-32BE Bytes: 00 10 FF FF
UTF-32LE Bytes: FF FF 10 00
1 Code Unit 4 Bytes 1 Grapheme

The absolute maximum scalar value defined by Unicode. Encodes as 0010FFFF.

Byte Order & Serialization: UTF-32BE vs. UTF-32LE

The Unicode Standard formally separates the in-memory encoding form (32-bit integer code units) from the serialized encoding scheme (ordered 8-bit byte streams). When a 32-bit code unit is written to a file or network socket, byte order must be specified.

UTF-32BE (Big-Endian / Network Byte Order)

Most significant byte first. Used by standard internet protocols.

B₀ = (W >> 24) & 0xFF // Most significant byte B₁ = (W >> 16) & 0xFF B₂ = (W >> 8) & 0xFF B₃ = W & 0xFF // Least significant byte

UTF-32LE (Little-Endian / x86 & ARM Native)

Least significant byte first. Native memory layout on modern CPUs.

B₀ = W & 0xFF // Least significant byte B₁ = (W >> 8) & 0xFF B₂ = (W >> 16) & 0xFF B₃ = (W >> 24) & 0xFF // Most significant byte
Character Scalar Value 32-Bit Code Unit UTF-32BE (Big-Endian) UTF-32LE (Little-Endian) Serialization Behavior
A U+0041 00000041 00 00 00 41 41 00 00 00 ASCII Capital A: BE puts leading zeros first; LE places byte 0x41 in lowest position.
é U+00E9 000000E9 00 00 00 E9 E9 00 00 00 Latin-1 character: BE = 00 00 00 E9, LE = E9 00 00 00.
U+20AC 000020AC 00 00 20 AC AC 20 00 00 BMP symbol: In LE, byte 0xAC leads followed by 0x20 and two null bytes.
😀 U+1F600 0001F600 00 01 F6 00 00 F6 01 00 Supplementary emoji: BE splits high byte 0x01 then 0xF6; LE reverses to 0x00 0xF6 0x01 0x00.
U+10FFFF U+10FFFF 0010FFFF 00 10 FF FF FF FF 10 00 Codespace boundary: BE has 0x00 then 0x10; LE leads with two 0xFF bytes.

Notice the Leading Zero Bytes

Because all valid Unicode scalar values are $\le \text{U+10FFFF}$, the highest byte ($B_0$ in BE, $B_3$ in LE) is always 0x00 for every valid Unicode character. Furthermore, for all ASCII characters ($U+0000$ to $U+007F$), three of the four bytes are null bytes (0x00).

Byte Order Mark (BOM) Semantics

In byte-serialized streams where byte order is not explicitly stated, Unicode defines code point U+FEFF (ZERO WIDTH NO-BREAK SPACE) as a Byte Order Mark (BOM) signature placed at the beginning of the file.

UTF-32BE BOM Signature U+FEFF
00 00 FE FF

The 32-bit code unit 0000FEFF serialized in big-endian order puts the two null bytes first, followed by 0xFE and 0xFF.

UTF-32LE BOM Signature U+FEFF
FF FE 00 00

The 32-bit code unit 0000FEFF serialized in little-endian order puts 0xFF and 0xFE first, followed by two null bytes.

BOM Normative Usage Rules (Unicode 17.0 §3.10)

  • Explicit UTF-32BE or UTF-32LE streams (e.g. Content-Type: charset=utf-32be) do NOT require a BOM.
  • In generic UTF-32 streams, decoders inspect the first 4 bytes to deduce endianness.
  • When used as a signature at stream start, U+FEFF is stripped by conformant decoders and not rendered.
  • If an initial 00 00 FE FF is read as Little-Endian, it yields 0xFFFE0000 (> U+10FFFF), immediately exposing the endian mismatch.
  • If an initial FF FE 00 00 is read as Big-Endian, it yields U+FFFE0000 (> U+10FFFF), immediately exposing the endian mismatch.

Conformance Validation: Prohibited Values & Errors

Unlike arbitrary 32-bit integer arrays, UTF-32 is strictly constrained to Unicode scalar values. Any parser, converter, or validator must reject values that do not correspond to valid Unicode scalar values.

SURROGATE_VALUE

Surrogate Code Point Prohibited

Range: 0000D800–0000DFFF

Surrogates are reserved exclusively for UTF-16 surrogate pairs and are expressly NOT Unicode scalar values (Unicode 17.0 §3.8, D88). UTF-32 cannot encode surrogates.

OUT_OF_RANGE

Out of Unicode Codespace

Range: > 0010FFFF (up to FFFFFFFF)

The Unicode codespace strictly ends at U+10FFFF (1,114,111). Any 32-bit integer exceeding 0010FFFF is invalid Unicode and cannot be represented.

MALFORMED_BYTE_LENGTH

Truncated 4-Byte Sequence

Range: Byte count not divisible by 4

Every serialized UTF-32 code unit requires exactly 4 contiguous bytes. A stream with non-multiple of 4 bytes is incomplete or corrupted.

INVALID_HEX_CHARACTER

Non-Hexadecimal Format

Range: Characters outside [0-9A-Fa-f]

Hexadecimal code units must contain valid hexadecimal digits formatted in 8-digit groups.

Conformance Test Vectors

Test Vector Error Classification Validation Verdict Technical Reason
0000D800 SURROGATE_VALUE REJECTED (Ill-Formed) Lead surrogate code point (U+D800). Rejected because surrogates are not scalar values.
0000DFFF SURROGATE_VALUE REJECTED (Ill-Formed) Trail surrogate code point (U+DFFF). Rejected as non-scalar value.
00110000 OUT_OF_RANGE REJECTED (Ill-Formed) First code point beyond Unicode codespace (U+110000). Exceeds 0010FFFF limit.
FFFFFFFF OUT_OF_RANGE REJECTED (Ill-Formed) Maximum 32-bit unsigned integer. Far exceeds the Unicode codespace.
80000000 OUT_OF_RANGE REJECTED (Ill-Formed) Bit 31 set. Outside Unicode codespace.
00 00 20 MALFORMED_BYTE_LENGTH REJECTED (Ill-Formed) Only 3 bytes provided. Serialized UTF-32 requires 4-byte alignment.

Core Architectural Concepts & Pitfalls

Essential distinctions between abstract Unicode code points, concrete code units, serialized byte orders, and human-perceived grapheme clusters.

Code Unit vs. Code Point: The 1:1 Identity

In UTF-32, the abstract Unicode scalar value and the 32-bit code unit share identical numeric values. For example, U+1F600 has the scalar value 0x1F600 and encodes into the 32-bit code unit 0001F600. While the numerical value is identical, the concepts remain distinct: a code point is an abstract position in the Unicode codespace, whereas a code unit is the concrete bit representation used in memory or storage.

The Grapheme Caveat: Why UTF-32 Is Not "1 Visible Character = 4 Bytes"

A persistent myth in software engineering is that UTF-32 allows O(1) random indexing of visible characters. While UTF-32 provides direct O(1) indexing of Unicode scalar values, human-perceived characters (grapheme clusters) frequently comprise multiple scalar values. A combining accent sequence like "e + \u0301" requires two UTF-32 units (8 bytes), and emoji ZWJ sequences like "👩‍💻" require three UTF-32 units (12 bytes). True string segmentation requires Unicode Annex #29 grapheme cluster boundaries, regardless of encoding form.

Encoding Form vs. Encoding Scheme: Byte Ordering

Unicode formally distinguishes between an encoding form (which operates on in-memory integer units) and an encoding scheme (which specifies how those units serialize into an ordered sequence of 8-bit bytes). UTF-32 is the encoding form. When serialized into bytes, byte endianness must be specified: UTF-32BE places the most significant byte first (00 01 F6 00), while UTF-32LE places the least significant byte first (00 F6 01 00).

Why Surrogates Are Strictly Forbidden in UTF-32

Surrogates (U+D800–U+DFFF) were created solely as a mechanism for UTF-16 to address code points above U+FFFF. Because UTF-32 uses 32-bit code units, it can directly represent any scalar value without surrogates. The Unicode Standard formally defines Unicode scalar values as all code points excluding surrogates. Any 32-bit integer in the range 0000D800–0000DFFF is therefore ill-formed and must be rejected by conformant UTF-32 parsers.

UTF-32 vs. UCS-4 Historical Context

Historically, ISO/IEC 10646 defined UCS-4 as a full 31-bit encoding capable of addressing up to 2 billion characters (0x00000000 to 0x7FFFFFFF). When Unicode and ISO synchronized their standards, Unicode capped the codespace at 17 planes (U+10FFFF). UTF-32 was defined as the restricted Unicode form that represents only Unicode scalar values up to U+10FFFF. In modern computing, UCS-4 and UTF-32 are identical in practice, as ISO 10646 has aligned with Unicode codespace boundaries.

Encoding Comparison: UTF-8 vs. UTF-16 vs. UTF-32

How UTF-32 compares directly to variable-width Unicode encoding forms across code unit size, storage efficiency, endianness dependency, and standards adoption.

Architectural Feature UTF-8 UTF-16 UTF-32 (This Page)
Code Unit Size 8 bits (1 byte) 16 bits (2 bytes) 32 bits (4 bytes)
Code Units per Scalar 1 to 4 code units 1 or 2 code units Exactly 1 code unit
Serialized Bytes per Scalar 1, 2, 3, or 4 bytes 2 or 4 bytes Always 4 bytes
Fixed Width per Scalar No (Variable width) No (Variable width via surrogates) Yes (Fixed 32-bit code units)
Fixed Width per Visible Grapheme No No No (Multi-scalar graphemes require >1 unit)
ASCII Storage Efficiency Optimal (1 byte / 100% ASCII match) Moderate (2 bytes / 100% overhead) High Overhead (4 bytes / 300% overhead)
Endianness Dependency None (Byte-oriented stream) Yes (UTF-16BE / UTF-16LE) Yes (UTF-32BE / UTF-32LE)
Web Standard Status Universal Web Standard (HTML5/WHATWG) Supported for legacy/APIs Not used for web document interchange
Primary Use Case Network interchange, web, storage, files Windows APIs, Java/JS string engines Internal fixed-width indexing, parsers, C/C++ wchar_t

Authoritative Standards & Normative References

All data, scalar boundary rules, 32-bit code unit definitions, and byte serialization orders on this page are derived directly from normative technical standards: