Loading Techie Utils…

Text to PDF Converter

Set a plain text file as a document. Free, and runs entirely in your browser — nothing you enter is uploaded, stored or sent to a server.

About Text to PDF

A plain text file set as a document: proper margins, a readable measure, and pages that break where pages should.

Two ways to read the file, and the choice matters more than it looks. As paragraphs, blank lines separate paragraphs and everything else reflows to the page width — which is what a plain text document means and what makes it readable on paper. One line per line keeps every break exactly as written, which is what a log, a listing, a poem or an ASCII diagram needs and what turns prose into a ragged mess.

The typesetting is the same engine the Word and Excel conversions use, so the margins, the line breaking and the page handling are consistent across everything here that produces a PDF.

Where it helps

  • Two readings — reflowed paragraphs or exact lines — which covers both of the things a .txt file can be.
  • The same layout engine as the Office conversions, so margins and breaks are consistent.
  • Page size, orientation and margin are all yours.
  • The file never leaves your browser — a log or an export usually should not.
  • UTF-8 is read correctly, including accented text.

Limits

  • Standard PDF fonts are Latin-1 only, so characters outside that repertoire are substituted — Greek, Cyrillic and CJK will not set.
  • One typeface throughout; there is no styling to apply because plain text carries none.
  • Very long unbroken strings — a base64 blob, a long URL — wrap at the margin rather than being broken sensibly.
  • No page numbers or headers; the Page Numbers and Header & Footer tools add those afterwards.
  • 8 MB is the ceiling for one conversion.

Frequently asked questions

Which reading mode should I choose?

Paragraphs for prose — notes, an article, anything written to be read. One line per line for anything where a break is meaningful: code, logs, tables held together by spaces, poetry.

Why did my non-Latin text disappear?

The standard PDF fonts cover Latin-1 and nothing else, and embedding a font that covers more is a different and much larger job. A document in Greek, Russian or Japanese needs a converter that can embed the right font.

Can I add page numbers?

Not here — convert first, then run the result through Page Numbers. Keeping the two separate means the numbering options are the same wherever the document came from.

What happens to tabs?

They are set as spaces at whatever the font's tab width works out to, which means a table aligned with tabs may not align. Spaces are more reliable for that.

Related tools

  • Markdown to PDF — Set Markdown as it renders: headings, emphasis, lists, code, quotes and tables
  • PDF to Text — Pull the text out of a PDF as plain text
  • JSON to PDF — Print a JSON file as an indented tree
  • Word to PDF — Turn a .docx document into a PDF that looks the way it does in Word
  • Icon Font Generator — Build a web font from SVG icons or an SVG font
  • Image Converter — Convert between PNG, JPEG, JFIF, WebP, GIF, HEIC and SVG

More Images & Files tools