TXT files: plain text, and what "plain" leaves out
Why plain text has no formatting, what encoding and line-ending differences do, and what you get extracting text from a PDF. Convert to TXT in your browser, no upload.
At a glance
- Type
- Documents
- Extensions
- .txt
- MIME type
- text/plain
A .txt file is characters and nothing else — no fonts, no sizes, no bold, no headings, no images, no page structure. That absence is the point: plain text is the format that every tool on every platform can read, that will still open in fifty years, and that is trivial to search, grep, diff and feed into another program.
Read more
Two invisible details cause most of the trouble with text files. Encoding: the same bytes mean different characters under UTF-8, Windows-1252 or GB18030, which is why a file can open as readable text in one editor and as garbage in another. Everything this site writes is UTF-8, which is the modern default. And line endings: Windows uses carriage return plus line feed, Unix and macOS use line feed alone, which is why a file sometimes appears as one long line or gains stray characters.
Extracting text from a PDF is the most common way people end up here, and it is worth knowing exactly what survives. Lines are reconstructed from the positions of glyphs on the page, so the output keeps its line breaks. Paragraph structure, headings, emphasis, tables and columns are not representable in plain text at all — if you need those, Word is the target, and it takes the same route including on-device recognition when the PDF is a scan.
Convert TXT to other formats
Convert other formats to TXT
FAQ
What encoding does the output use?
UTF-8, which is the modern default and handles every language. If a file looks like garbage in an old editor, that editor is probably assuming a legacy encoding instead.
Why does my text file show as one long line?
Line-ending differences. Windows expects carriage return plus line feed; Unix and macOS use line feed alone. Some Windows editors show a Unix file as a single line as a result.
What is lost extracting text from a PDF?
Everything except the characters and the line breaks: no headings, no bold, no tables, no images, no columns. If you need structure, convert to DOCX instead.
Why is my two-column PDF jumbled in the text file?
Because a PDF stores positioned glyphs rather than columns, so reading order has to be inferred — and for multi-column layouts the inference is often wrong. That is inherent to the format.
Does it work on scanned PDFs?
Yes. When a PDF has no text layer, an AI recognition model runs in your browser to read the characters off the page images. Nothing is uploaded.
Why choose TXT over DOCX?
When you want the words rather than a document — to search, to paste into notes, to feed to another tool, or to store something that will still open decades from now.