.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 typePlain Text
Human readabilityHigh
Nesting supportNo
LLM token efficiencyHigh
File extension.txt
MIME typetext/plain
Best forUniversal 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

Related Formats

All 24 formats

Plain 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.