Detect File Encoding
Find out whether a file is UTF-8, UTF-16, Windows-1252, Windows-1256, ISO-8859-1 and more, with a relative likelihood for each possible encoding.
Detect file encoding, preview text and convert to UTF-8. Fix garbled text and mojibake instantly. Free and private.
Select one to preview the file as that encoding.
The raw bytes at the start of your file. A BOM or a telltale pattern often shows up here.
Paste some text to start.
Which writing systems appear in your text, by number of letters.
Detection and conversion run entirely inside your browser. Your files and text are never uploaded, sent to a server or stored.
Drop a text file, or paste text that looks broken.
See the best encoding, its likelihood and a live preview.
Download clean UTF-8 or copy the repaired text.
Does your text file show strange symbols such as é, ’ or question marks instead of normal letters? That is an encoding problem, and this free text encoding detector helps you solve it. Drop a text file and the tool finds the most likely character encoding, such as UTF-8, UTF-16, Windows-1252 or Windows-1256, shows how likely each match is, and lets you preview the file as any encoding. When the preview looks right, you can download the file as clean UTF-8, with an optional UTF-8 BOM that helps older versions of Excel. It also has a Fix garbled text mode that repairs mojibake, the broken text that appears when the wrong encoding was used.
Encoding problems are common with CSV exports, subtitle files, old documents, emails and web pages, especially for languages such as Urdu, Arabic, Russian, Hindi and accented European text. Guessing the right encoding by trial and error wastes a lot of time. This tool does the analysis for you and gives you evidence, including the byte order mark, line endings, whether the file is valid UTF-8 and the first bytes in a hex view. Detection and conversion run inside your browser, so your files are never uploaded, and files up to 50 MB can be handled.
Find out whether a file is UTF-8, UTF-16, Windows-1252, Windows-1256, ISO-8859-1 and more, with a relative likelihood for each possible encoding.
Paste text that shows characters like é or ’ and get repair suggestions that turn it back into readable text.
Preview the file in any encoding and download a clean UTF-8 copy, with an optional BOM for older Excel versions.
See whether the file starts with a BOM, and learn which encoding it points to.
Check scripts found in your text and rescue Urdu, Arabic and Russian text that shows as strange symbols.
Look at the raw bytes at the start of the file, where a BOM or a telltale pattern often shows up.
Computers store text as numbers. A character encoding is the rulebook that says which number stands for which character. If a file was saved with one rulebook and opened with another, the numbers are read wrongly and you see broken characters. The most important encoding today is UTF-8, which can represent every character in every language and is the standard of the modern web. Older files often use encodings such as Windows-1252 for Western European languages or Windows-1256 for Arabic and Urdu.
A text file does not usually say which encoding it uses, so software has to guess. A text encoding detector looks at the bytes of the file and works out which encoding fits best, which is why detection gives a likelihood and not a guarantee.
Finding the encoding of a file takes a few seconds with our free tool.
If you only need to remove strange symbols from text that is already readable, the Special Character Remover may be the quicker choice.
| Encoding | Covers | Typical use |
|---|---|---|
| UTF-8 | All languages and symbols | Websites, apps, APIs, modern files |
| UTF-16 | All languages, two or more bytes per character | Windows files, some Excel exports |
| ASCII | Basic English letters, digits and symbols | Old systems and simple data files |
| Windows-1252 | Western European languages | Older Windows documents and CSV files |
| ISO-8859-1 | Western European languages | Old websites and email |
| Windows-1256 | Arabic, Persian and Urdu | Older Arabic and Urdu documents |
| Windows-1251 | Russian and other Cyrillic languages | Older Russian files |
| Shift_JIS, GBK, Big5 | Japanese, Simplified Chinese, Traditional Chinese | Older East Asian files |
These patterns are the typical signs of mojibake, and each one points to a likely cause.
| What you see | What it usually means | Likely fix |
|---|---|---|
| é instead of é | UTF-8 text was read as Windows-1252 | Open or repair it as UTF-8 |
| ’ or “ | Curly quotes saved in UTF-8 but read as Windows-1252 | Repair the text or open the file as UTF-8 |
| Question marks or boxes | Characters were lost or the font cannot show them | Check the source file and convert to UTF-8 |
| Ù…Ø±ØØ¨Ø§ style text | Arabic or Urdu UTF-8 read as a single byte encoding | Repair as UTF-8 or preview as UTF-8 |
| Cyrillic letters like пр | Russian UTF-8 read as Windows-1252 | Preview and convert using UTF-8 |
| Spaces between every letter | UTF-16 text read as a single byte encoding | Preview as UTF-16 |
First detect the encoding and make sure the preview looks correct. Then click Download as UTF-8. The tool decodes the file with the encoding you selected and saves it as UTF-8, which is the safest choice for websites, databases, apps and sharing. Turn on Add UTF-8 BOM only when you need to open the file in an older version of Excel, because that program uses the BOM to recognize UTF-8. Most other programs do not need it.
Switch to the Fix garbled text tab and paste the broken text. The tool shows repair suggestions and statistics such as characters, non-ASCII characters, replacement characters and invisible characters, plus the scripts found in your text. If a suggestion looks right, copy it. Mojibake can often be reversed only when no characters were lost. If the file already contains replacement characters, the original information may be gone and you need the source file again.
No. Detection is a smart guess based on byte patterns. Pure ASCII text is valid in many encodings, short files give little evidence, and some single byte encodings look very similar. That is why the tool shows a relative likelihood and a list of other possible encodings with a live preview. The best test is your own eyes: the correct encoding makes the text readable in its language.
Yes. Detection and conversion run entirely inside your browser, so your files and text are never uploaded, sent to a server or stored. Files up to 50 MB can be handled on your device. As a general habit with any online tool, be careful with files that contain passwords or very sensitive information.
This tool is often one step in a bigger text workflow. These related free tools help with the rest of the job:
Our text encoding detector was built to take the guesswork out of broken text. You get a likely encoding, evidence from the file, a live preview, a clean UTF-8 download and a repair tool for mojibake, all without signup or uploads.
Ready to try it? Scroll back up, drop your file or paste your garbled text and see the result.
Quick answers about finding the encoding of a file, fixing garbled text, converting to UTF-8 and how accurate detection can be.
Drop the file into the detector. The tool checks for a byte order mark, tests whether the bytes are valid UTF-8, looks for UTF-16 patterns and scores common legacy encodings. It shows the best match with a relative likelihood and lets you preview the file in any candidate encoding to confirm the answer by eye.
This is mojibake, caused by reading text with a different encoding than the one used to write it. Characters like é usually mean UTF-8 text was read as Windows-1252. Question marks or black diamonds can mean the original characters were lost or replaced. Use the "Fix garbled text" tab to try to reverse the wrong step.
UTF-8 and UTF-16 can both store every Unicode character, but UTF-8 uses one to four bytes and is the standard on the web, while UTF-16 uses two or four bytes. Windows-1252 is an older single byte encoding for Western European languages that can store only 256 characters. Only the Unicode encodings can mix many scripts in one file.
Upload the file, select the encoding whose preview shows correct text, and click Download as UTF-8. Tick the BOM option if the file must open correctly in older versions of Excel. For code, JSON and shell scripts it is better to leave the BOM out.
Not always. A BOM or a valid multi byte UTF-8 sequence gives strong evidence, but many single byte encodings use the same bytes for different letters, and a short text can fit several of them. That is why the tool shows a ranked list and a live preview, so you can confirm the right encoding by checking that the text is readable.
Often, yes. If the file is a legacy Windows-1256 or Windows-1251 file, upload it, select that encoding in the preview and download the UTF-8 version. If you only have pasted text that was UTF-8 read as Windows-1252, the repair tab can usually restore it. If the text already became question marks, the original characters are gone and you need the source file.
Your file is never uploaded. It is read and analyzed inside your browser and disappears when you close the page. The tool accepts files up to 50 MB, and for very large files it analyzes the first part of the file for speed. As a general habit, avoid handling highly sensitive data on any website you do not fully trust.
Detect encoding and fix garbled text, then remove special characters, clean text or compare two texts in seconds. Explore free text tools to write, edit and repair all your content in one place.
Explore All Text Tools →