Toolvito

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

Values that do not fit, likely mojibake, lost characters and the longest values.

Your values

A CSV export of a table, or values one on each line.

More options

Names from the header row, separated by commas. Leave it empty to check every column.

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.

Check large exports

Check large exports

Choose up to 20 CSV exports (with a header row) or text files with one value on each line, of up to 1 GB each. Every value is checked row by row with the rules above, and you get the counts for each column and the problems with their row as CSV files.

Or drop files here. CSV, TSV, TXT or TAB, up to 20 files, 1 GB each at most.

    Names from the header row, separated by commas. Leave it empty to check every column.

    Everything above is worked out in your browser. When you use this box, the files you choose are sent to the Toolvito server. Download the result within one hour after the job finishes. Choose Delete files now to request earlier removal. The hourly cleanup normally removes files within one to two hours after completion.

    How to use it

    1. Export the table as CSV with a header row, or paste values one on each line.
    2. Choose the character set of the column you want to put the data into: utf8mb4, utf8mb3 (utf8), latin1 or ascii.
    3. Press Check the text and read the problems. If there is likely mojibake, download the repaired values and check a few by eye.
    4. 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.
    5. 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.

    Related tools