TXT: the plain text format
A .txt file contains only characters: no fonts, bold, images or page layout. It is the oldest and simplest document format, defined in internet standards as the media type text/plain (RFC 2046). What matters inside is the character encoding, which maps bytes to letters; UTF-8 is the modern default and covers every language, while older files may use a regional code page.
Key facts
- Extensions
- .txt
- Media type
- text/plain
- Standard
- RFC 2046 (text/plain)
Where it is used
Plain text is used for notes, logs, README files, configuration files, transcripts, exported chat histories, data dumps and drafts. Developers and system administrators live in it, and many programs export plain text when nothing else is needed.
Strengths
Any device and any program can open it, today and in fifty years. Files are tiny, easy to search, compare and process with software, and nothing hidden travels with them, no macros, metadata or tracking. Version control systems handle text better than any other format.
Limitations
There is no formatting at all: no headings, tables, images or page breaks. Wrong encoding turns accented letters into garbage, and Windows and Unix use different line endings. Long lines may wrap differently from one editor to another.
Converting it to PDF
TXT to PDF lays your text out on A4 pages in a monospaced font and wraps long lines, so nothing is cut off and plain-text columns stay aligned. It reads UTF-8, UTF-16 and Latin-1 files. For headings, lists and tables, write Markdown and use Markdown to PDF instead.
Getting it back from a PDF
PDF to Text extracts the text layer of a PDF in your browser and saves it as a .txt file, without uploading anything. Layout, tables and images are dropped and columns may be read in a different order. Scanned PDFs have no text, so run OCR first.
Convert with these free tools
Side-by-side comparisons
- Plain text vs MarkdownPlain text is the simplest format anyone can read; Markdown adds headings, lists and tables with light symbols. Compare TXT and MD for notes, docs and PDF output.
- Scanned vs searchable PDFA scanned PDF holds pictures of pages, a searchable PDF also holds the words behind them. Learn the difference and how OCR turns one into the other.
PDF terms explained
- Text layerThe text layer is the part of a PDF that holds real characters, so you can search, select and copy. Learn how scans get one through OCR and how to check for it.
- OCR (optical character recognition)OCR turns the picture of a page into text you can search and copy. Learn how it works, what affects its accuracy and why a scanned PDF needs it.
Guides that put it into practice
Common questions
- Why do accented letters look wrong in my text file?
- The file was read with the wrong encoding. Save it as UTF-8 in your editor and convert it again.
- Can PDF to Text read a scanned document?
- No. A scan is an image without characters. Use OCR PDF first to add a text layer, then extract the text.
- Is a TXT file safer to share than a DOCX?
- It cannot contain macros or hidden metadata, so there is less to leak, but the text itself is fully readable and editable.