Free Online Utility • UTF-8 Studio • RFC 3629 Engine

Convert UTF8 to UTF-2

Encode UTF-8 text or extended 31-bit UCS-4 scalars (U+0000..U+7FFFFFFF) into authentic 1–6 byte UTF-2 (Plan 9 UTF-2 (1992)) sequences.

Reference & UTF-8 Spec RFC 3629
1B: 0xxxxxxx | 2B: 110xxxxx | 3B: 1110xxxx | 4B: 11110xxx
5B: 111110xx (to 0x3FFFFFF) | 6B: 1111110x (to 0x7FFFFFFF)
1–4 BytesIdentical to RFC 3629 UTF-8
5-Byte LeadF8–FB (UCS-4 26-bit)
6-Byte LeadFC–FD (UCS-4 31-bit)
PLAN 9 UTF-2 (1992) ENCODER
Encoded UTF-2 Bytes

        
100% client-side RFC 3629 UTF-8 Engine Instant

Session Calculation Log

No entries recorded in this session yet.

How Convert UTF8 to UTF-2 Works

Convert UTF8 to UTF-2 encodes modern UTF-8 text (and optional 31-bit UCS-4 scalars up to U+7FFFFFFF) into Plan 9 UTF-2 (1992) byte sequences.

UTF-8 (RFC 3629) is the dominant variable-width character encoding of the web, representing every Unicode scalar value from U+0000 to U+10FFFF in 1 to 4 self-synchronizing bytes while remaining 100% backward-compatible with 7-bit ASCII. Every conversion and analysis in this tool executes locally inside your browser with zero server uploads, preserving full privacy and instant response times.

UTF-2 1–6 Byte Prefix Grammar

1B: 0xxxxxxx (7 bits)
2B: 110xxxxx 10xxxxxx (11 bits)
3B: 1110xxxx 10xxxxxx×2 (16 bits)
4B: 11110xxx 10xxxxxx×3 (21 bits)
5B: 111110xx 10xxxxxx×4 (26 bits)
6B: 1111110x 10xxxxxx×5 (31 bits)

UTF-2 was Ken Thompson & Rob Pike’s 1992 Plan 9 predecessor to UTF-8 — identical bit prefixes across 1–4 bytes and extending to 5–6 bytes for full 31-bit UCS-4!

Worked Reference Examples

InputOutputTechnical Note
Hello Café 🌍48 65 6C 6C 6F 20 43 61 66 C3 A9 20 F0 9F 8C 8DIdentical to modern UTF-8
U+00200000 (UCS-4)F8 88 80 80 805-byte historical form
U+7FFFFFFF (UCS-4)FD BF BF BF BF BFMax 6-byte 31-bit scalar

Practical Developer & Systems Workflows

Systems & Encoding History

Explore the exact 1992 UTF-2 encoding that became RFC 3629 UTF-8.

Testing Legacy 5/6-Byte Decoders

Generate valid 5- and 6-byte UCS-4 sequences to test RFC 3629 strictness.

Compatibility, Edge Cases & Best Practices

RFC 3629 (2003) formally restricted UTF-8 to 1–4 bytes (U+10FFFF) to guarantee 1:1 equivalence with UTF-16.

Copy verified outputs directly to your clipboard or export clean UTF-8 files ready for source repositories, REST APIs, database migrations, protocol test suites, and systems debugging.

Frequently Asked Questions

How does UTF-2 differ from modern RFC 3629 UTF-8?
For all valid Unicode characters (U+0000–U+10FFFF), UTF-2 and UTF-8 are byte-for-byte identical; UTF-2 additionally defined 5-byte (`F8–FB`) and 6-byte (`FC–FD`) sequences up to `0x7FFFFFFF`.
Why were 5-byte and 6-byte sequences removed in RFC 3629?
Unicode capped its codespace at `U+10FFFF` so UTF-8, UTF-16, and UTF-32 could map identically without overflow.
Can I encode 5-byte and 6-byte test vectors here?
Yes — switch Input Mode to Parse U+XXXXXXXX Scalars and enter values like `U+7FFFFFFF`.