A Windows-1252 file containing the euro sign as byte 0x80 converts to UTF-8 bytes E2 82 AC.

That example works because the source encoding is known. Converting a file to UTF-8 is not a universal byte replacement: the converter must first decode the characters from the encoding that actually produced the file, then encode those characters as UTF-8. Selecting a plausible but incorrect source can silently change names, punctuation, or symbols.

The UTF-8 Converter follows that file-based process. You choose the source encoding, load a local text file, review the decoded characters, and download a BOM-free UTF-8 file. It does not guess the encoding for you.

convert to utf-8 example
Convert to UTF-8 Example: A Windows-1252 File

A Windows-1252 conversion example

Suppose an older application exports a text file in Windows-1252 and writes the euro sign as the single byte 0x80. During conversion, that byte is decoded as the character “€.” The browser’s UTF-8 encoder then represents “€” with the three bytes E2 82 AC. The character is unchanged; only its byte representation changes.

This is not a translation step. The converter preserves the decoded text content rather than producing a byte-for-byte copy of the source file. That distinction matters because Windows-1252 uses one byte for each character, while UTF-8 can use one to four bytes depending on the character.

Source selection What it represents Important verification point
UTF-8 A file already encoded as UTF-8 Invalid sequences fail instead of becoming replacement characters; a source BOM is consumed.
UTF-16LE UTF-16 with the low byte stored first Selecting the wrong byte order can produce nonsense text.
UTF-16BE UTF-16 with the high byte stored first Confirm the producer’s byte order rather than inferring it from appearance.
Windows-1252 A legacy single-byte Western code page Use it only when the file’s producer or reliable metadata identifies Windows-1252.

The Windows-1252 mappings used by the browser follow the WHATWG Encoding Standard. In particular, bytes 80 through 9F can represent printable punctuation and symbols such as the euro sign and curly quotation marks, rather than the control characters associated with some other single-byte encodings.

Convert a text file to UTF-8

  1. Establish the real source encoding. Check the producing application, its export settings, delivery documentation, or other reliable metadata. Do not infer the encoding solely from whether accented characters look correct in a preview or text editor.
  2. Select the matching source mode and local file. Choose UTF-8, UTF-16LE, UTF-16BE, or Windows-1252 according to the source. The selected text file must be no larger than 10 MB.
  3. Convert and inspect the preview. Check representative non-ASCII lines, especially personal names, punctuation, currency symbols, and characters outside the basic ASCII range. The preview displays the decoded characters rather than a raw hexadecimal dump.
  4. Download the UTF-8 result. The downloaded file is encoded as UTF-8 without an added byte-order mark, and its filename adds “-utf8.” A recognized source BOM is removed during decoding.
  5. Test the result in the destination application. Open or import the downloaded file where it will actually be used. Confirm that the representative text appears correctly before replacing the source file.

If you change the selected file or source encoding, reconvert it. The previous visible result is cleared and its old download URL is invalidated, so a download should always correspond to the latest selection.

What the preview can confirm

The preview is the main character-level check between selection and download. It can reveal an obviously wrong source selection because names, quotes, currency signs, or other non-ASCII characters may appear as nonsense. It does not prove every byte in the file is appropriate, however, and it may not display every control character or Unicode normalization difference.

Check What it means What to do
Readable non-ASCII preview The selected decoder produced plausible characters. Inspect representative names, punctuation, symbols, and non-ASCII lines.
Fatal decoding error The source bytes are invalid under the selected encoding. Confirm the source encoding or obtain a corrected source file; do not treat the failed conversion as successful.
Different source and output byte counts Character byte lengths differ between the selected encoding and UTF-8. Do not infer data loss from file size alone; compare the decoded content.
No BOM in the output The result follows the converter’s BOM-free UTF-8 export behavior. Confirm that the destination application does not specifically require a UTF-8 BOM.

UTF-8 is a variable-length encoding, so a correct conversion can make the file larger or smaller. The converter reports source and output byte counts to make that change visible, but only the changed byte count cannot establish whether the text was preserved.

Avoid encoding guesses and silent corruption

Legacy byte sequences can be valid under more than one encoding while representing different characters. An automatic guess may therefore produce readable output and still corrupt meaningful text. Explicit source selection keeps the transformation auditable: the converter applies the encoding you selected instead of replacing malformed input with questionable characters.

In UTF-8 mode, the converter uses fatal error handling. Invalid continuation bytes, truncated sequences, and forbidden encodings cause a clear failure rather than replacement characters. The byte-level rules are defined in RFC 3629. UTF-16 decoding also rejects unpaired or malformed surrogate sequences. Valid surrogate pairs, including those used by emoji, are combined into one Unicode scalar value before UTF-8 output.

The converter does not repair mixed-encoding files reliably. If different sections of one file were produced with different encodings, no single decoder can reconstruct the intended characters with confidence. It also does not heuristically repair mojibake, normalize Unicode, translate languages, or modify line endings beyond what results from decoding and UTF-8 encoding.

Local processing and the file-size limit

The browser reads the selected file, decodes it, displays the preview, and creates a downloadable UTF-8 file without uploading the source bytes. The 10 MB limit exists because the file is handled in an in-memory browser buffer, and the size is checked before reading so an unexpectedly large file is not loaded.

For database dumps or multi-gigabyte logs, use a trusted streaming conversion utility with explicit source and destination encodings instead. A streaming workflow is better suited to files that exceed the browser tool’s in-memory limit and can be configured for an automated production process.

Verify the result before replacing the original

Test the converted file in the application that will consume it. For a business document, check names, accented text, quotation marks, and currency symbols. For text containing emoji or other supplementary characters, confirm those characters survive the round trip into the destination.

Keep the original until the complete workflow is verified. A successful preview and download show that the selected decoder produced UTF-8 bytes, but only testing in the destination application confirms that the resulting file is suitable for that use.

Related reading: ASCII Converter Alternative: Strict 7-Bit or UTF-8?.

Related reading: Convert to UTF-8 Explained: Characters, Bytes, and Errors.