Graph
UTF-32

🔠UTF-32

NEW

A fixed-width Unicode encoding where each code point is represented by 32 bits.

DESCRIPTION

UTF-32 (also known as UCS-4) encodes each Unicode scalar value as a 32-bit integer, providing constant-time indexing and simplicity. It is less space-efficient than UTF-8/UTF-16 for most text but avoids surrogate pairs and variable-length decoding. UTF-32 can be stored in big-endian or little-endian forms and may include a BOM to indicate endianness. It’s used in internal representations and APIs where simplicity outweighs storage costs.

ALTERNATIVE DEFINITIONS

Unicode Consortium

UTF-32 is a simple format that encodes each Unicode scalar value as 32 bits.

Highlights fixed-width 32-bit encoding for each scalar value.

Source

Python Documentation

UTF-32 uses 4 bytes per code point and is a fixed-length encoding.

Emphasizes fixed-length and 4-byte representation in Python context.

Source

ICU (International Components for Unicode)

UTF-32 represents each Unicode code point with 32 bits, simplifying indexing at the cost of memory.

Notes simplicity of indexing versus memory overhead trade-off.

Source

Unicode Code Point UCS-4 BOM Endianness

COMPETING TERMS

UTF-8 UTF-16

KNOWLEDGE AREAS

Data Integration & Interoperability Programming Languages Data Storage & Operations

TARGET AUDIENCE

Software Developer Data Engineer Full Stack Developer

EXTERNAL SOURCES

TOP QUESTIONS

When is UTF-32 preferable over UTF-8 or UTF-16?

When constant-time indexing and simplicity are more important than storage efficiency, such as certain internal representations.

Category: Opinion

Does UTF-32 require surrogate pairs?

No. Each code point is represented directly, avoiding surrogate pairs used in UTF-16.

Category: Overview

What are the storage trade-offs of UTF-32?

UTF-32 consumes more memory, typically 4 bytes per character, which is inefficient for common text.

Category: Risk

How does endianness affect UTF-32?

UTF-32 can be big-endian or little-endian; a BOM may indicate byte order.

Category: Requirements

Is UTF-32 widely used in file formats?

Less common than UTF-8; usage is limited due to size overhead.

Category: Misunderstanding

How does UTF-32 handle non-BMP characters?

All code points, including non-BMP, map directly to a single 32-bit value.

Category: Overview

Can UTF-32 be converted to other encodings?

Yes, conversion libraries and APIs handle transcoding among UTF-8, UTF-16, and UTF-32.

Category: Interoperability

Does UTF-32 have a BOM?

It may include a BOM to indicate endianness for UTF-32BE or UTF-32LE.

Category: Specification

What systems expose UTF-32 APIs?

Some programming languages, libraries, and OS APIs provide UTF-32 code point interfaces.

Category: Platform