Encoding API - Interactive Lab | IconVault
Explore TextEncoder and TextDecoder with UTF-8 byte visualization, multi-encoding decode and streaming demos. Free, runs in your browser.
Encoding API
TextEncoder/Decoder with byte visualization and streaming
Chars
11
Bytes
18
Ratio
1.64
5 of 5 free uses left.
Byte colors
ASCII (1 byte)Lead byteContinuation
Byte visualization
Per-character breakdown
| Char | Code point | UTF-8 bytes |
|---|---|---|
| H | U+0048 | 48 |
| e | U+0065 | 65 |
| l | U+006C | 6C |
| l | U+006C | 6C |
| o | U+006F | 6F |
| , | U+002C | 2C |
| β£ | U+0020 | 20 |
| δΈ | U+4E16 | E4 B8 96 |
| η | U+754C | E7 95 8C |
| β£ | U+0020 | 20 |
| π | U+1F30D | F0 9F 8C 8D |
Decode hex with any encoding
Streaming decode demo
Split the bytes into 1-byte chunks. Without { stream: true } a multibyte character cut in half decodes as οΏ½; with streaming the decoder buffers the partial bytes.
Naive: first chunk decoded alone
H
Streaming: progressive output
(press run)
const bytes = new TextEncoder().encode(text);
const decoder = new TextDecoder("utf-8", { stream: true });
for (const chunk of chunks) {
// stream: true keeps incomplete multibyte chars buffered
output += decoder.decode(chunk, { stream: true });
}
output += decoder.decode(); // flushAbout this tool
IconVault's Encoding API playground makes TextEncoder and TextDecoder visible. Type any text and see its exact UTF-8 bytes as a color-coded hex grid, inspect the per-character breakdown of code points and byte sequences, then decode hex back to text with any encoding label from utf-8 and utf-16 to windows-1252 and shift_jis. It is free and runs fully in your browser.
The streaming demo shows why { stream: true } matters: split bytes into tiny chunks and watch a naive decode produce replacement characters while the streaming decoder buffers partial multibyte sequences correctly. Every concept ships with copyable code, so you can paste the pattern straight into your fetch handlers, WebSocket code or file parsers.
Frequently asked questions
Popular searches
More tools
Algorithm Visualizer
Watch sorting and searching animate step by step
Alt Text Helper
Write better image alt text with live feedback
ARIA Reference
Searchable ARIA roles and attributes guide
Array Visualizer
Step through map, filter, reduce like a debugger
Coming soon
CLI
Coming soon
Figma plugin
Coming soon
VS Code extension
Coming soon
Chrome extension
Coming soon
AI icon generator
Coming soon
Team workspaces
Coming soon