Skip to main content

File Encoding Converter

API reference

Convert text or a file between character encodings — UTF-8, UTF-16, Latin-1, Windows-1252, ISO-8859 variants, Cyrillic, Greek, Shift_JIS, GBK, Big5, EUC-KR and more. Optional BOM, flags characters the target charset can't represent, and downloads the re-encoded bytes.

Input

Or upload a file
Drop a file or browse
One file · any type

Any text file. Read locally in your browser. Used only when the text box is empty.

Applies to uploaded files only — pasted text is already Unicode. Not sure? Try the Character Encoding Detector.

Output

Result
PropertyValue
No data yet
Your re-encoded file will appear here to download.
Round-trip preview (result decoded back)

What the converted bytes read as in the target encoding — check it for ? or � marks.

Bytes (hex)
Was this helpful?

More ways to use this tool

REST API

curl -X POST https://api.iotools.cloud/v1/tool/file-encoding-converter \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file": "",
    "sourceEncoding": "utf-8",
    "targetEncoding": "windows-1252",
    "addBom": "",
    "strict": "",
    "inputText": "Café — naïve “quotes” €5"
  }'

Swap in your own key from your account. The tool's fields are the body — no wrapper.

Ask an AI agent

Use the IOTools `file-encoding-converter` tool (File Encoding Converter) on this input:

YOUR_INPUT_HERE

Paste this at any agent connected to the IOTools MCP server, then add your input.

Embed widget

<iframe
  src="https://iotools.cloud/embed/file-encoding-converter/"
  width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
  title="File Encoding Converter — iotools.cloud"
  sandbox="allow-scripts allow-forms allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox"
  allow="clipboard-write"
  style="width:100%;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden"></iframe>
<script src="https://iotools.cloud/embed.js" async></script>

Drop this into your own page — free, no key required, just a link back.

Cost per API/MCP callFrom 5 credits
Need more credits?View pricing

Also available with

Guides

An old export opens with é where é should be, a legacy system only accepts Windows-1252, or a Japanese partner sends Shift_JIS files your tools choke on. The File Encoding Converter re-encodes text or a whole file from one character encoding to another and hands back the converted file, with a hex view of the exact bytes it wrote.

How to use it

Paste text, or drop a file into the uploader. For an uploaded file, pick the encoding it is currently saved in; pasted text is already Unicode, so that setting is ignored. Choose the encoding to convert to, and the result appears immediately: a summary table, a Converted file you can download, a round-trip preview, and the bytes in hex.

Not sure what the source encoding is? Run the file through the Character Encoding Detector first.

Supported encodings

  • Unicode: UTF-8, UTF-16 LE and UTF-16 BE, with an optional byte order mark (BOM).
  • Western and Central European: US-ASCII, ISO-8859-1 (Latin-1), Windows-1252, ISO-8859-15, ISO-8859-2, Windows-1250, Windows-1257, Mac Roman.
  • Cyrillic: Windows-1251, ISO-8859-5, KOI8-R, KOI8-U, IBM866.
  • Greek, Turkish, Hebrew, Arabic, Vietnamese, Thai: ISO-8859-7, Windows-1253/1254/1255/1256/1258, ISO-8859-8, Windows-874.
  • East Asian: Shift_JIS and EUC-JP (Japanese), GBK (Simplified Chinese), Big5 (Traditional Chinese), EUC-KR (Korean).

Characters the target can't represent

A legacy charset holds only a few hundred (or a few thousand) characters, so converting Unicode text into one can lose some. By default each unrepresentable character is replaced with ? and the summary lists exactly which ones were affected, so nothing is lost silently. Tick Fail if a character can't be represented to refuse the conversion instead.

The round-trip preview decodes the converted bytes back to text. Look there for ? or � marks to see what the target encoding actually kept.

Common pitfalls

  • Wrong source encoding. If an uploaded file decodes to � characters, the summary reports how many bytes were invalid — a strong sign you chose the wrong source encoding.
  • Latin-1 vs Windows-1252. They agree except for bytes 0x80–0x9F, which are curly quotes, dashes and € in Windows-1252 but invisible control codes in Latin-1. Most "Latin-1" files from Windows are really Windows-1252.
  • BOMs. UTF-8 does not need a BOM; add one only when a program (older Excel, for instance) insists on it.

Is my file uploaded anywhere?

No. Conversion runs entirely in your browser, and the file never leaves your device.

charseticonvmojibakelatin-1windows-1252shift_jisgbkbomutf-16legacygarbledre-encode

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.