Check the preview, choose the source encoding, then save a separate UTF-8 copy.
How to use
Choose a TXT or CSV file.
Choose the source encoding and inspect the preview for decoding errors.
Confirm the preview, choose whether to include a BOM, and save a new UTF-8 copy.
1. Original file
TXT / CSV, up to 5 MiB. Your original stays unchanged. Files and filenames are not uploaded or automatically saved.
BOM evidence: No file selected
Successful decoding does not identify the correct encoding. Compare names and symbols with the original source.
Decoded preview
The full text is available in the preview. Large inputs use pages; review each page through the end. Download uses the full decoded text, preserving CRLF, LF, CR and Unicode without normalization.
Share only the tool name and public URL. Your input and results are not included.
How to choose the encoding
A BOM is a byte signature at the start of some files, not proof that the rest of the file is valid. Without a BOM, this tool does not detect the encoding. Try the source encodings and check names, punctuation and Japanese text. Valid decoding alone cannot guarantee you chose the correct encoding.
For example, a Japanese CSV from an older system may need Shift_JIS. Emoji usually need UTF-8 or UTF-16. Shift_JIS here uses the browser’s WHATWG mapping (including Windows-31J extensions). CSV cells and formulas are not changed; open files from trusted sources.
Try a use case and check the result
Use small original sample files to inspect BOM evidence, your selected encoding and the settings for a new UTF-8 copy.
Trying an example replaces the input and settings and runs the tool above. Restore previous input restores the preceding input and settings, not a saved copy of the calculated result; run again as needed. Existing storage rules apply.
After trying multiple examples, repeat Restore previous input to return to your original input. History is kept only in this page; restore any input you need before closing it.
Read a UTF-8 BOM without carrying it into output
Input and settings
sample-utf8.csv
Bytes: EF BB BF 41 2C 42 0D 0A
Source: UTF-8; no added output BOM
sample-utf16.txt
Bytes: FF FE 48 00 69 00 0A 00
Source: UTF-16LE; add an output BOM
Expected result
Preview: Hi + LF
Source BOM evidence: UTF-16LE (2 bytes)
Output: 6 bytes including a UTF-8 BOM. Confirmation remains unchecked
How to read the result
A BOM is byte evidence, not automatic encoding identification. Choose the source encoding yourself and inspect the full preview before confirming. Examples neither confirm for you nor start a download. Restoration returns the preceding file and settings, but not the preview’s scroll/page position.
Scope and limits
TXT/CSV files up to 5 MiB are supported. Source encodings are UTF-8, Shift_JIS and UTF-16LE/BE; output is UTF-8. Malformed bytes, non-text controls or BOM conflicts block saving. Lost characters and custom-glyph portability cannot be guaranteed. Line endings and Unicode forms are not normalized.
Verification: existing decode and encode functions check original-byte preservation, BOM removal/addition and CRLF/LF preservation. Sample files are generated in the browser and are not uploaded.
Can this repair text that was already saved incorrectly?
Not necessarily. If earlier decoding replaced bytes with � or saved garbled text, the original information may be lost. This tool converts the selected decoding; it does not claim to repair it.
What happens with invalid bytes or binary files?
Malformed sequences are shown with replacement characters in the preview and download is blocked. A literal � already in valid text is also flagged for review. NUL and non-text control characters are rejected. UTF-16 requires an even number of bytes. Try another encoding or return to the original source.
How are BOMs and line endings handled?
Only a matching leading source BOM is consumed as encoding metadata. A conflicting or unsupported UTF-32 BOM blocks export. Other U+FEFF characters remain content. If preserved content begins with U+FEFF, its UTF-8 bytes look like a BOM even without an added prefix. The output BOM is your choice, independent of the source. No newline is added, removed or normalized; empty files are accepted.
Keep any content you need before clearing. This tool does not autosave inputs or results. Reloading or closing the page, clearing inputs or resetting may discard your work.
Favorites and language preferences are stored separately and may be lost when site data is cleared. Tool resets and site-data deletion do not delete files already downloaded to your device.