Documents
How to Convert a TXT File to PDF (Step by Step)
Turn a plain text file into a PDF online, on Windows, on a Mac, in Google Docs, on iPhone or on Android - and how to keep line breaks, special characters and long lines looking right.
· 3 min read · RunConvert Team
A TXT file is plain text: no fonts, no layout, nothing but words and line breaks. That makes it easy to write, but awkward to share. It can look different in every app, and it can't be signed, printed neatly or attached to a form that asks for a PDF. Converting it to PDF fixes that. Here's how, on any device.
Convert TXT to PDF online (any device)
The quickest way, and it works the same on Windows, Mac, Chromebook, iPhone and Android:
- Open the TXT to PDF converter.
- Drop your
.txtfile onto the page, or click Choose Files. You can add up to 20 files at once. - Make sure PDF is selected as the output format.
- Click Convert.
- When it's done, click Download All to save your PDF.
No sign-up is needed, and your files are deleted automatically after conversion.
On Windows (Notepad)
Windows can "print" any text file to a PDF:
- Open the file in Notepad.
- Press Ctrl + P (or choose File › Print).
- Pick Microsoft Print to PDF as the printer.
- Click Print, choose where to save the file and give it a name.
On a Mac (TextEdit)
- Open the file in TextEdit.
- Choose File › Export as PDF.
- Pick a name and a folder, then click Save.
In Google Docs
- Upload the TXT file to Google Drive.
- Right-click it and choose Open with › Google Docs.
- Choose File › Download › PDF Document (.pdf).
This is handy when you also want to add headings, bold text or images before making the PDF.
On iPhone or iPad
- Open the online TXT to PDF converter in Safari.
- Tap Choose Files and pick the file from the Files app.
- Tap Convert, then Download All. The PDF is saved to Files › Downloads.
On Android
- Open the TXT to PDF converter in Chrome.
- Tap Choose Files and pick your text file.
- Tap Convert, then Download All. The PDF appears in your Downloads folder.
Make the PDF look right
Text files have no formatting of their own, so a few things are worth checking before you convert:
- Special characters: accented letters, emoji and non-Latin scripts (such as Chinese, Arabic or Cyrillic) need the file to be saved as UTF-8. In Notepad, choose File › Save As and set Encoding to UTF-8. In TextEdit, choose UTF-8 when you save.
- Very long lines: text that was written without line breaks wraps to fit the page. The PDF uses a fixed-width font, so columns made with spaces (in a log file or a simple table) still line up as long as each line fits on the page.
- Blank lines: empty lines in the text become empty lines in the PDF, so remove extra ones if the PDF looks too spread out.
- Headings and bold text: a TXT file can't hold formatting. If you need it, convert to Word first with TXT to DOCX, format the document, then save it as a PDF. Markdown files can go straight to a formatted PDF with Markdown to PDF.
After converting
- One PDF from several text files: convert them all, then combine them with Merge PDF.
- Smaller file for email: text PDFs are usually small already, but Compress PDF can shrink them further.
- Need the text back? Keep the original TXT file, or use PDF to TXT to get the text out of the PDF again.
Frequently asked questions
Common questions about using RunConvert to convert your files.