.txt · text/plain
Plain Text (TXT): Unformatted Plain Text
Plain text (.txt) stores raw character sequences encoded as UTF-8 or legacy code pages (GBK, Big5, Shift-JIS) with zero formatting wrappers.
Quick Answer: Plain text (.txt) stores raw character sequences encoded as UTF-8 or legacy code pages (GBK, Big5, Shift-JIS) with zero formatting wrappers. Universal logs, raw transcripts, cleaned LLM prompts, scripts, and zero-markup reading.
| Structure type | Plain Text |
|---|---|
| Human readability | High |
| Nesting support | No |
| LLM token efficiency | High |
| File extension | .txt |
| MIME type | text/plain |
| Best for | Universal logs, raw transcripts, cleaned LLM prompts, scripts, and zero-markup reading. |
Strengths
- Zero proprietary lock-in; readable on any operating system indefinitely
- Smallest raw footprint and minimal LLM tokenization overhead
- Ideal target when removing PDF line wraps, HTML tags, or AI Markdown
Trade-offs
- Lacks explicit encoding metadata—legacy CJK files require BOM or detection
- CRLF vs. LF line-ending mismatches break Unix shell scripts
- Cannot preserve headings, bold emphasis, or tabular cell borders
References
Convert & clean Plain Text (TXT) locally
Related engineering guides
- How to Anonymize Text, Contracts & Logs for ChatGPT LocallyReplace names, IBANs, contracts, and secrets with reversible [[TYPE-NN]] tokens locally in browser RAM before pasting prompts into ChatGPT or Claude.
- Fixing GBK, Big5, Shift-JIS & EUC-KR Garbled Text LocallyDiagnose and repair garbled Chinese, Japanese, and Korean text files (GBK, GB18030, Big5, Shift-JIS, EUC-KR) to clean UTF-8 without uploading.
- Markdown to PDF & PDF to TXT: Clean Offline Document WorkflowsExport Markdown runbooks to A4 or Letter PDFs with CJK font support, and extract clean unwrapped TXT or Markdown from local PDFs via PDF.js.
- Why Excel Garbles UTF-8 CSVs — and How UTF-8 BOM Fixes ItStop Microsoft Excel from turning Chinese, Japanese, Korean, Spanish, and German CSV text into mojibake by adding a 3-byte UTF-8 BOM locally.
Related Formats
All 24 formatsPlain Text (TXT) frequently asked questions
Why does a .txt file look normal on Windows but turn into gibberish on macOS?
Older Windows Notepad and Chinese/Japanese/Korean tools save files in GBK, Big5, Shift-JIS, or EUC-KR without metadata, whereas modern editors assume UTF-8.
What is the difference between LF and CRLF line endings?
Unix, Linux, and macOS use LF (\n), whereas Windows uses CRLF (\r\n). Bash scripts with CRLF often fail with $'\r': command not found errors.
How do I fix choppy line breaks copied from a PDF?
Use Remove Line Breaks to rejoin mid-sentence wraps and hyphenated words while keeping real paragraph breaks intact.