Decodex

DECODEX · BASE64

Base64 encoding Korean text and emoji with UTF-8

Compare identical text encoded as different bytes. Select a character encoding from knowledge of the source, not from the language of the website.

Reproduce the same word with different source encodings

Enter 한글 in the encoder. UTF-8 produces 7ZWc6riA; EUC-KR / CP949 produces x9Gx2w==. The experiment below displays the actual byte sequences before encoding. These values represent the same word, not interchangeable byte streams. Match the decoder to the encoding used by the sender.

An error-free result can still be wrong

Decoding UTF-8 bytes for Café as Windows-1252 gives Café. No Base64 character has been lost: the error is the interpretation of the bytes. Repeatedly re-encoding the garbled result makes diagnosis harder. Obtain the original bytes and a known word from the source before choosing an encoding.

Know what an encoding cannot represent

CP949 cannot represent 😀. Decodex rejects this conversion instead of silently substituting a question mark. UTF-8 supports the example. An encoding selector does not translate a language, identify a file format or reliably detect the source encoding. Use JavaScript’s explicit UTF-8 pipeline when implementing the same behavior in your application.

Verified experiments

Input / operationExpected resultBrowser result
한글 · UTF-8ed 95 9c ea b8 80 → 7ZWc6riA → 한글Not run
한글 · EUC-KR / CP949c7 d1 b1 db → x9Gx2w== → 한글Not run
x9Gx2w== · UTF-8Error (expected rejection)Not run
Café · UTF-8 → Windows-1252CaféNot run
😀 · EUC-KR / CP949Error (expected rejection)Not run

What the results mean

한글 is six bytes in UTF-8 and four in CP949. Both representations are valid; reading CP949 as UTF-8 fails. Café can become Café without throwing an error, so successful conversion alone cannot prove the encoding was correct.

How to reproduce

In the encoder enter 한글 and select UTF-8, then EUC-KR / CP949. Copy each value to the decoder and select the matching encoding. Finally decode x9Gx2w== as UTF-8 to reproduce the failure.

Base64 →

Verification method

These fixed, public fixtures run against the same file codec and character codecs used by the converter. The JavaScript cases additionally check browser-native btoa, TextEncoder, URLSearchParams and SHA-256. Expected outputs are published before any script runs; the button shows actual results in your browser. No input is uploaded.

JavaScript · guide-cases.js · JavaScript · file-codec.js

Scope and limitations

Checked on 2026-10-21. This is a correctness check with small fixtures and one 100,000-character case, not a speed benchmark or a guarantee for every file. The four-byte file is synthetic binary data, not a PNG or PDF. SHA-256 equality checks byte preservation; it does not establish that a file is safe to open. Results can depend on browser support.

References

Choose a guide for your problem