Text encoding converter
Convert text or a local file between declared encodings, with an explicit BOM policy and rejection of character loss.
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.
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
Base64 encoder and decoder
Encode local UTF-8 text or a file as Base64/Base64url, and decode to text or a file.
Text and file hash generator
Compute SHA-256, SHA-384 or SHA-512 for UTF-8 text or the exact bytes of a local file.
Unicode inspector
Inspect the original Unicode code points and grapheme clusters, and apply explicit normalization to a separate text result.