All conversions run locally in your browser. We do not upload or store your files.

Back to home

Text Encoding

Decode with selected encoding, output UTF-8

All conversions run locally in your browser. We do not upload or store your files.Convert your file

Convert your file

Loading converter…

How to use this tool

Text Encoding

What this tool does

Text Encoding fixes garbled plain-text files that were saved with a legacy character encoding such as GBK, GB2312, Big5, or ISO-8859-1 (Latin-1). Modern apps expect UTF-8; opening a mislabeled file in VS Code or Notepad often shows mojibake (乱码). This tool re-decodes bytes using the encoding you specify and writes a clean UTF-8 .txt file.

It is especially useful for older Chinese Windows Notepad files, log exports from legacy ERP systems, and CSV files saved in a local code page before import into a UTF-8 database.

Supported formats

Input: plain .txt files (binary-safe read as bytes). You must select the source encoding: UTF-8, GBK, GB2312, Big5 (Traditional Chinese), or ISO-8859-1.

Output: UTF-8 encoded .txt with no BOM by default. Word documents (.docx), PDFs, and binary formats are not supported — only raw text.

Step-by-step

Step 1: Identify or guess the original encoding. GBK/GB2312 for simplified Chinese Windows text; Big5 for Traditional; Latin-1 for Western European legacy files.

Step 2: Upload the .txt file.

Step 3: Select the source encoding from the dropdown.

Step 4: Click Convert and download the UTF-8 result.

Step 5: Open in a modern editor — if characters still look wrong, try a different source encoding and convert again.

Limitations & tips

Wrong source encoding produces different garbled output — there is no automatic detection. Mixed-encoding files (part UTF-8, part GBK) cannot be fixed in one pass.

The entire file is loaded into memory; files above ~50 MB may fail on phones. Does not convert line endings (CRLF vs LF) — use a text editor for that. Not a substitute for iconv on server batch jobs.

Common use cases

Legacy exports: fix CSV or txt files from older Windows systems (GBK, Big5).

Log files: decode mislabeled server logs to readable UTF-8.

International data: recover mojibake from wrong encoding assumptions.

Privacy & local processing

Document Converter never uploads your file for conversion. Processing uses JavaScript in your browser tab — the same security boundary as editing a document offline. Closing the tab clears the in-memory copy unless you saved the output.

We may load analytics or ads when you visit the site, but those requests do not include your document bytes. For HR records, medical forms, or unreleased designs, local conversion avoids the third-party upload step that cloud converters require.

Browser-local vs cloud upload

Cloud tools like Smallpdf and iLovePDF receive your file via HTTP upload, process it on their servers, and return a download link. That model is convenient for public PDFs but adds privacy and compliance risk for sensitive content.

Document Converter runs pdf-lib, PDF.js, Mammoth, SheetJS, or Tesseract.js directly in your browser. Open DevTools → Network while converting: you should see no POST containing your file. You trade server-side CPU for device-side privacy — often the right choice for personal and workplace documents.

Common questions

How do I guess the source encoding?

Legacy Chinese Windows Notepad → GBK or GB2312. Traditional Taiwan exports → Big5. Western European exports → ISO-8859-1. When unsure, try the most likely option and check the preview text.

Will the output be UTF-8?

Yes. The tool re-decodes bytes with your chosen source encoding and writes clean UTF-8 .txt for modern apps.

Can I fix a garbled CSV export?

Yes if the file is plain text. Pick the encoding the upstream system used before export — not Excel binary .xlsx.

How do I know the source encoding?

Try UTF-8 first, then GBK/Big5 for Chinese exports, Latin-1 for older Western European files.

Binary files?

This tool expects text. Do not use on PDFs or images.

Output encoding?

Always UTF-8 — the modern default for web, databases, and git.

Real-world examples

A developer fixes mojibake in a legacy GBK log file exported from an old ERP system.

A researcher converts ISO-8859-1 CSV exports to UTF-8 before importing into a database.

A developer converts a GBK-encoded legacy config export to UTF-8 before committing to git.

A developer converts a GBK-encoded legacy config export to UTF-8 before committing to git.