Text encoding converter

Convert text or a local file between declared encodings, with an explicit BOM policy and rejection of character loss.

Processing is local with no automatic storage. Worker deadline: 5 seconds; complete result including details: 2 MiB. Preview is bounded; copy and download are complete.

Latin-1 means actual ISO-8859-1, not Windows-1252. Strict decoding without guessing or replacement; unrepresentable output characters are rejected. “Do not add” retains any U+FEFF in the text; “Add” prepends another BOM if content already starts with it. ASCII and Latin-1 do not support added BOMs. Copy returns Unicode text; download returns bytes in the selected encoding without changing the original file.

How to use

Choose text or a local file. For a file, select its source encoding and whether to preserve its BOM or strip one matching BOM. Choose the target encoding and output BOM policy, then process. Review the decoded text; copy returns text, while download contains actual bytes in the selected encoding.

Try an example

Converting Aé to UTF-16LE without adding a BOM produces bytes 41 00 E9 00; adding a BOM produces FF FE 41 00 E9 00. Converting the same text to US-ASCII fails because é cannot be represented.

Support & limits

There is no encoding detection or replacement of malformed characters, and the engine does not change CR/LF. The text field may normalize line endings when pasting; choose a file to read its original bytes without that step. UTF-8 is strict; UTF-16 rejects odd byte counts, isolated surrogates and a BOM that contradicts the chosen byte order. US-ASCII accepts only 0–127. ISO-8859-1 maps bytes 0–255 directly to U+0000–U+00FF; it is not Windows-1252. The input BOM policy applies only to files in Unicode encodings: preserve retains U+FEFF, while strip removes one matching marker. Direct text retains U+FEFF literally. No added output BOM does not remove an existing U+FEFF; add prefixes a new BOM even when the text already starts with U+FEFF. Adding a BOM to ASCII or ISO-8859-1 is unsupported and rejected.

Common questions

Does copying preserve the file’s encoded bytes?

No. Copy transfers Unicode text, and the system clipboard may apply its own line-ending behavior. If text contains NUL, the button becomes “Copy text as JSON” to preserve it as a quoted, escaped string; the copy representation is limited to 2 MiB. Use the download when exact encoding and BOM bytes matter. Changing a filename extension alone does not change its encoding.

Related tools