Converting a file to UTF-8 means decoding its bytes with the file's actual source encoding, then encoding the decoded Unicode characters as UTF-8.
UTF-8 is a byte encoding, not a language, character set, or font. A source file's bytes can look plausible while representing the wrong names, punctuation, or symbols when an incorrect legacy encoding is selected. Understanding the two-stage process helps you convert a file without silently changing its meaning.

How UTF-8 represents text
Unicode assigns numbers, called code points, to characters. An encoding then defines how those code points are represented as bytes. UTF-8 uses variable-length sequences: ASCII characters use one byte, many non-ASCII characters use two or three, and supplementary characters use four. The format and its restrictions are defined by RFC 3629.
This distinction explains why conversion is more than renaming a file with a UTF-8 extension. The bytes must first be interpreted correctly. Only after decoding can the resulting characters be encoded again as UTF-8. A byte-for-byte copy of the source file would not accomplish that task.
Why the source encoding must be known
Legacy encodings can assign different characters to the same byte value. UTF-16 also stores its code units in one of two byte orders. As a result, visually plausible output is not proof that the source encoding was correct: a wrong selection can damage accented letters, names, quotation marks, currency symbols, or emoji.
The local UTF-8 Converter requires you to select the encoding that actually produced the file. It supports UTF-8, UTF-16 little-endian, UTF-16 big-endian, and Windows-1252. The browser reads the local file, previews the decoded text, and creates a downloadable BOM-free UTF-8 file without uploading the source bytes.
Determine the source encoding from the producing application, its export settings, reliable file metadata, or documentation. Do not choose an encoding merely because the preview looks reasonable under that setting.
| Source mode | What the bytes represent | Important check |
|---|---|---|
| UTF-8 | Unicode characters encoded with UTF-8 byte sequences | Malformed sequences cause a clear decoding failure |
| UTF-16LE | UTF-16 code units stored with the low byte first | Confirm the correct byte order before conversion |
| UTF-16BE | UTF-16 code units stored with the high byte first | Confirm the correct byte order before conversion |
| Windows-1252 | Legacy single-byte characters, including common Western punctuation and symbols | Check quotation marks, currency symbols, and accented text |
Convert a local file with a controlled workflow
- Identify the real source encoding. Use the file's producing application or reliable metadata rather than guessing from its appearance. If the encoding remains unknown, pause before converting because the resulting characters could be wrong.
- Select the source mode and choose the file. Open the UTF-8 Converter, select UTF-8, UTF-16LE, UTF-16BE, or Windows-1252 according to the file's origin, and choose a local text file no larger than 10 MB. The size limit is checked before the browser reads the file.
- Convert and inspect the preview. Read the decoded preview rather than checking only the first few lines. Inspect representative names, punctuation, currency symbols, emoji, and other non-ASCII content that matters to the document.
- Download the UTF-8 result. The generated file is BOM-free, and its filename adds -utf8. Changing the selected file or source encoding clears the visible result and invalidates the previous download URL, so download again after making a change.
- Test the converted file in its destination. Open it in the application that will use it and confirm that the important characters and file structure appear correctly. Retain the original file until the complete workflow has been verified.
The browser-based workflow keeps the source bytes on the local device. It also gives you a preview before download, but the preview is a review aid rather than a guarantee that every possible issue has been detected.
Read the preview and byte counts
The preview shows the characters produced by the selected decoder. This makes it useful for spotting an obviously incorrect source choice, such as reversed UTF-16 byte order or text decoded under the wrong Windows-1252 interpretation. It may not display every control character or reveal every Unicode normalization difference, so inspect the parts of the file most likely to contain meaningful non-ASCII data.
The converter also reports the source and output byte counts. Different counts are expected because encodings use different numbers of bytes for the same characters. A larger output does not by itself mean that content was duplicated, and a smaller output does not necessarily mean that data was lost.
One concrete Windows-1252 conversion shows why the size can change:
- Source byte: 0x80
- Decoded character: the euro sign, U+20AC
- UTF-8 output bytes: E2 82 AC
The output represents the decoded character rather than copying the original Windows-1252 byte. Re-encoding a character can require more bytes than its legacy representation.
Validation, byte order, and BOM behavior
Malformed UTF-8 fails clearly
UTF-8 mode uses fatal error handling. Invalid continuation bytes, truncated sequences, and forbidden byte patterns cause a clear failure rather than being replaced with replacement characters. This strict behavior prevents the converter from presenting damaged input as a successful conversion. The tool follows the browser decoding model described by the WHATWG Encoding Standard.
UTF-16 byte order changes the characters
UTF-16LE stores the low byte of each code unit first, while UTF-16BE stores the high byte first. Reversing that order can make the letters appear nonsensical even though pairs of bytes remain readable. Supplementary characters such as emoji use UTF-16 surrogate pairs: the decoder combines a valid high and low surrogate into one Unicode scalar value before producing UTF-8. An unpaired or malformed surrogate sequence is rejected under fatal decoding.
Source BOMs are removed
A matching source BOM is recognized and removed. In UTF-8 mode, a leading UTF-8 BOM is consumed by the standards-based decoder, and the downloaded encoder does not add another one. The result is therefore always BOM-free, even when the source contained a BOM.
Limits and files the converter cannot repair
The converter changes a local text file from one selected encoding into standard UTF-8. It does not detect encodings, heuristically repair existing mojibake, or normalize Unicode. It also does not translate languages or provide a separate line-ending conversion feature; any line-ending result follows from decoding and UTF-8 encoding.
| Situation | Limitation | Safe next step |
|---|---|---|
| The source encoding is unknown | The converter cannot infer it reliably | Find reliable metadata or confirm it with the producing application |
| One file mixes several encodings | A single decoder cannot repair mixed sections reliably | Split or regenerate the file from its original source |
| Text is already mojibake | The tool does not guess how to reverse earlier damage | Recover the original correctly encoded file when possible |
| The file exceeds 10 MB | The browser workflow cannot process it | Use a trusted streaming utility with explicit source and destination encodings |
| The preview appears correct | Some control-character or normalization issues may remain hidden | Check representative records and test the destination application |
The 10 MB limit exists because this workflow operates on an in-memory buffer in the browser. For database dumps, multi-gigabyte logs, or other large collections, use a trusted streaming conversion utility and state both encodings explicitly.
Test the result before replacing the original
Open the downloaded file in the destination application before using it as the replacement. Check representative records, compare punctuation and symbols, and confirm that the application opens the file as expected. Because the output is always BOM-free, verify the destination's handling rather than assuming it behaves exactly like a BOM-bearing version.
Keep the original until this test is complete. Once the converted file opens correctly and its important content matches the source, you can use it with confidence. If something looks wrong, revisit the source encoding rather than repeatedly converting the same uncertain selection.
For a deeper look, see UTF8 Decode JavaScript: Strict Bytes-to-Text Guide.
For a deeper look, see Base32 Decode Python: Bytes, Padding, and UTF-8.