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 / operation | Expected result | Browser result |
|---|---|---|
한글 · UTF-8 | ed 95 9c ea b8 80 → 7ZWc6riA → 한글 | Not run |
한글 · EUC-KR / CP949 | c7 d1 b1 db → x9Gx2w== → 한글 | Not run |
x9Gx2w== · UTF-8 | Error (expected rejection) | Not run |
Café · UTF-8 → Windows-1252 | Café | Not run |
😀 · EUC-KR / CP949 | Error (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.
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
How to fix Base64 decoding errors
Diagnose which layer failed: Base64 syntax, text interpretation, or file restoration. This page is the diagnostic starting point; the other guides explain each layer in depth.
Base64 vs Base64URL: differences, padding and decoding examples
Follow a Base64 value through a query string. This guide isolates transport damage from errors in the original value.
Base64 padding explained: what = and == mean
Work out padding from byte groups and check malformed endings. Character encoding and URL transport are covered separately.
JavaScript Base64 with Unicode: fix btoa() errors using UTF-8
Implement Unicode conversion in JavaScript and inspect cases where a successful btoa call still gives the wrong byte encoding.