> charset | codepage | converter <
Convert text to bytes in legacy character sets like Windows-1252, KOI8-R, GBK, Big5 and Shift_JIS, or decode hex bytes back to text.
19 Legacy Charsets
Latin-1, Windows code pages, ISO-8859 variants, KOI8, GBK, Big5, Shift_JIS and EUC-KR in both directions.
Fix Mojibake
Try different charsets on the same bytes to discover which one produced garbled text.
Unmappable Warnings
Characters missing from the target charset are flagged and counted instead of disappearing silently.
// CHARSET TECHNICAL INFO
How It Works:
Single-byte charsets map each byte value (0-255) to one character; East Asian charsets add lead/trail byte pairs. Decoding uses your browser's TextDecoder. For encoding, the tool builds a reverse lookup table by decoding every possible byte or byte pair once, so results match the browser's own tables.
Example:
café → Windows-1252: 63 61 66 E9 | UTF-8: 63 61 66 C3 A9 | 你好 → GBK: C4 E3 BA C3
Why Use This Tool:
- >Diagnose garbled text by testing code pages
- >Produce legacy-encoded bytes for old systems and file formats
- >Understand how one character differs across encodings
- >Check which characters a charset can represent
>> frequently asked questions
Q: What is a character set (charset)?
A: A character set maps characters to byte values. Unicode encodings such as UTF-8 can represent every character, while legacy charsets like Windows-1252, KOI8-R, GBK, Big5 or Shift_JIS cover only a language or region.
Q: How do I convert text to Windows-1252 or Latin-1 bytes?
A: Choose the charset, type your text with TEXT → BYTES selected and copy the hex. Characters that do not exist in the charset (for example Chinese in Latin-1) are replaced with ? and the tool tells you how many.
Q: How do I decode hex bytes in a legacy encoding?
A: Switch to BYTES → TEXT, select the charset that the data was written in and paste the hex. If the output looks wrong, try another charset - this is how mojibake is usually diagnosed.
Q: What is the difference between ISO-8859-1 and Windows-1252?
A: They agree on 0xA0-0xFF but differ in 0x80-0x9F: ISO-8859-1 has control codes there while Windows-1252 has printable characters like € (0x80), curly quotes and the en dash. Browsers treat "ISO-8859-1" as Windows-1252, but this tool decodes it strictly.
Q: Why do GBK, Big5, Shift_JIS and EUC-KR use two bytes?
A: These East Asian charsets contain thousands of characters, so most use a lead byte followed by a trail byte, while ASCII letters remain one byte.
Q: What is mojibake?
A: Mojibake is garbled text such as "café" caused by decoding bytes with the wrong charset. Decoding the bytes with the right charset (here: UTF-8 instead of Windows-1252) restores the text.
Q: Does this tool upload my text?
A: No. Conversion runs in your browser using the built-in TextDecoder API.
// OTHER LANGUAGES
References
How we make sure
We check this tool with the automated test suites linked below. Example checks are shown in their original language.
- Verification method
- Compare encoded bytes and decoded text for Latin-1 and Shift_JIS fixtures.
- Comparison reference
- Python standard-library codecs.
- Verification scope
- This comparison does not cover every charset; the host Windows-1252 runtime discrepancy is separately recorded.
Test source and cases (select a file to read it)
-
encoding-reliability.test.js
- Character-set converter: Latin-1 and Shift_JIS fixtures agree with Python codecs
These checks cover the listed examples and boundaries, not every possible input. Round trips and checks using the same library are not independent verification.