TXT to PDF: Turn a Plain Text File Into a PDF (Free)

Four free ways to convert a TXT file to PDF on Windows, Mac, or your phone — plus how to fix the ugly default font and margins.

By PeacefulPDF Team

A .txt file is the simplest document format there is — no fonts, no images, no layout, just characters. Which is exactly why people convert them to PDF: a text file opens differently everywhere, while a PDF looks identical on every screen and every printer. The good news is you don't need to install anything. The tools already on your computer do this fine, and the whole job takes under a minute.

Windows: Notepad plus Print to PDF

  1. Open the file in Notepad (double-click it, or right-click > Open with > Notepad).
  2. Press Ctrl + P.
  3. Choose Microsoft Print to PDF as the printer and click Print.
  4. Pick a name and folder for the PDF.

That's the whole conversion. If the Print to PDF option is missing from your printer list, it got switched off somewhere along the way — here's how to get it back. One formatting note: Notepad prints in a plain font with generous margins. If lines are wrapping in odd places, turn off Format > Word Wrap before printing, or drop the file into WordPad's successor of choice (Word, LibreOffice) for more control.

Mac: TextEdit exports PDF directly

  1. Open the .txt file in TextEdit.
  2. Go to File > Export as PDF.
  3. Name it, save it, done.

No print dialog needed. If you want nicer output — a different font, bigger margins — switch TextEdit to rich text first (Format > Make Rich Text), style the document, then export.

Any device: Google Docs

If you're on a Chromebook, a phone, or someone else's computer: upload the .txt file to Google Drive, open it with Google Docs, then File > Download > PDF Document. This route also gives you a real editor in the middle, so you can fix typos or add a heading before the PDF is frozen in place. Worth knowing: this does upload your file to Google — for anything sensitive, the offline methods above keep the file on your machine.

Fixing the ugly parts

Plain text files have no formatting of their own, so the converter's defaults decide everything. The three complaints I hear most:

  • Lines wrap mid-word or run off the page: the file has very long lines. Print in landscape, or reduce the font size in the print dialog.
  • It's all in Courier and looks like a ransom note: open the file in a word processor instead of a plain editor, set a normal font, then save as PDF from there.
  • One file became forty pages: that's genuinely how much text is in there — but if you only need part of it, print a page range instead of the whole file, or extract the pages you need from the finished PDF.

Several text files into one PDF

Print to PDF only handles one file at a time. If you're converting a batch — logs, chapters, meeting notes — convert each file, then combine them with our merge tool. It runs entirely in your browser, so nothing gets uploaded anywhere, and you can drag the files into whatever order you want before downloading the combined PDF.

Going the other direction — pulling plain text back out of a PDF — is covered in our PDF to text guide, and our converter does it locally in one step.