Calculates on this device. File exports run online.
Database Encoding Checker
Paste a CSV export of a table or a list of values, or open a file, and choose the character set of the column. The checker shows every value that the set cannot store (such as an emoji in a utf8mb3 column), text that was broken by a wrong encoding (“Café” for “Café”) with the repaired text, characters that were already lost (�), control characters and the longest value of each column in characters and bytes.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose the button below them.
Your result
How it was worked out
How to use it
- Export the table as CSV with a header row, or paste values one on each line.
- Choose the character set of the column you want to put the data into: utf8mb4, utf8mb3 (utf8), latin1 or ascii.
- Press Check the text and read the problems. If there is likely mojibake, download the repaired values and check a few by eye.
- To find out whether a file is UTF-8 at all, choose The bytes of a file: every invalid part is listed with its byte offset and line.
- For exports of many megabytes or millions of rows, use the box below.
The rules
- utf8mb4 stores every Unicode character; utf8mb3 (utf8 in older statements) only characters up to U+FFFF, so no emoji; MySQL’s latin1 is Windows cp1252; ascii is U+0000 to U+007F (MySQL 8.4 Reference Manual, 12.9 and 12.10).
- Likely mojibake is UTF-8 that was read as latin1 once: every character has a cp1252 byte, and those bytes are UTF-8 of another text. The repaired value is that text.
- � (U+FFFD) means that a part of the text was lost when it was read; it cannot be repaired from the value.
- Lengths are in characters, as VARCHAR(n) counts them, and in UTF-8 bytes.
Limits
- A rare real text can look like mojibake; check the repaired values before you change data.
- Text broken twice needs a second repair. Text that was cut where a character did not fit cannot be repaired.