Calculates on this device. File exports run online.
Encoding Validator & Repair Tool
Find out why a file shows strange characters. Check whether it is valid UTF-8, with the place of every bad byte, see its byte order mark, line endings and hidden characters, then write it again repaired: mojibake such as é turned back into é, invisible characters removed, in UTF-8 or another encoding. Pasted text and escaped characters can be checked too.
Enter your values
Check these values
This is off unless you turn it on. Saved entries stay in this browser only. Untick the box to delete them.
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
- Choose Check a file and pick a text file: CSV, TXT, JSON, XML, subtitles or code. Every bad byte is listed with its byte offset, line and column.
- To fix the file, choose Repair or convert a file, tick what to repair, pick the encoding to write and press Repair the file. Download the new file.
- For text you have copied, choose Check or clean pasted text. For text full of codes such as \u00e9, é or %C3%A9, choose Find escaped characters.
What the checks mean
- Valid UTF-8: every byte belongs to a correct UTF-8 sequence. A bad sequence usually means the file, or part of it, was saved in another encoding such as Windows-1252.
- Byte order mark (BOM): a few bytes at the start that some programs add. Excel likes one in a UTF-8 CSV; many scripts and web servers do not.
- Mojibake: UTF-8 text that was read as Windows-1252 and saved again, so é became é and – became –. The repair turns the bytes back, also for text that went wrong twice.
- Invisible characters: zero-width spaces and joiners, soft hyphens and bidirectional controls, which can break searches, code and data imports, or hide text.
- Encoding (best guess): a file that is not UTF-8 is most often Windows-1252. That is a guess: a single-byte encoding cannot be known for sure from the bytes, so you can choose another under Read as.
Large files and many files
The box below checks or repairs up to 20 files of up to 1 GB each on the server, with the same rules. You get a CSV report of every problem and the repaired files.