Free Online Utility • Unicode Studio • Grapheme-Aware Engine

Convert Unicode to Bytes

Convert Unicode strings into raw UTF-8, UTF-16BE, UTF-16LE, or UTF-32BE byte arrays in hex, decimal, binary, or code array syntax.

Reference & Unicode Spec Unicode 16.0
UTF-8: 1–4 bytes | UTF-16: 2 or 4 bytes (surrogates) | UTF-32: fixed 4 bytes
A (U+0041)UTF-8: 41 (1B)
é (U+00E9)UTF-8: C3 A9 (2B)
🌍 (U+1F30D)UTF-8: F0 9F 8C 8D (4B)
ENCODED BYTE STREAM
Byte Array Output

        
100% client-side Unicode Engine Instant

Session Calculation Log

No entries recorded in this session yet.

How Convert Unicode to Bytes Works

Convert Unicode to Bytes serializes any Unicode string into exact raw byte arrays using UTF-8, UTF-16BE, UTF-16LE, or UTF-32BE, formatted as hex, decimal, binary, JS/C arrays, or Python byte literals.

The Unicode Standard assigns unique scalar code points from U+0000 through U+10FFFF across 17 planes, encompassing over 150,000 characters spanning world scripts, mathematical operators, technical symbols, combining diacritics, and multi-codepoint emoji sequences. Every operation in this utility runs completely client-side inside your browser using native code-point and grapheme-cluster algorithms so surrogate pairs, ZWJ emoji, and combining marks stay intact with zero server latency.

Multi-Encoding Byte Serialization

UTF-8:   1B (U+0000..007F), 2B (..07FF), 3B (..FFFF), 4B (..10FFFF)
UTF-16:  2B BMP, 4B Surrogate Pair (0xD800..0xDFFF)
UTF-32:  Always 4 bytes per scalar code point

Comparing UTF-8, UTF-16, and UTF-32 byte counts side-by-side clarifies wire-format sizes for APIs, network buffers, and memory layouts.

Worked Reference Examples

InputOutputTechnical Note
Hello 🌍!48 65 6C 6C 6F 20 F0 9F 8C 8D 2111 UTF-8 bytes
日本語E6 97 A5 E6 9C AC E8 AA 9E9 UTF-8 bytes vs 6 UTF-16B
🌍 (UTF-32BE)00 01 F3 0D4 fixed bytes

Practical Developer & Internationalization Workflows

Network & Protocol Debugging

Generate exact UTF-8/UTF-16 byte payloads for sockets, protobufs, and packet fixtures.

Cross-Language Byte Literals

Export ready-to-paste `0x..` arrays or Python `b"\x.."` strings.

Compatibility, Edge Cases & Best Practices

Endianness matters for UTF-16 and UTF-32: switch between UTF-16BE and UTF-16LE to match Windows, Java, or network byte order.

Copy verified outputs directly to your clipboard or export them as UTF-8 text files ready for web apps, REST APIs, database migrations, typography tests, and localization pipelines.

Frequently Asked Questions

Why does an emoji like 🌍 take 4 bytes in UTF-8 and 4 bytes in UTF-16?
Because U+1F30D is outside the Basic Multilingual Plane (>U+FFFF), requiring a 4-byte UTF-8 sequence or a 2-unit (4-byte) UTF-16 surrogate pair.
Does UTF-8 have endianness (BE vs LE)?
No — UTF-8 is byte-oriented and has only one universal byte order.
Can I export Python bytes literals?
Yes — choose Python bytes from Output Style.