Plain text is everywhere: meeting notes typed in Notepad, a log file from a server, a list of instructions copied from a chat, a draft poem. It is perfect for writing, but awkward to share formally. Some people's phones open .txt files in odd apps, long lines scroll off the side of the screen, and there is no page structure at all. Converting to PDF gives the text real pages, readable margins and a format anyone can open or print.
This guide covers what happens when text becomes a PDF, how to choose a font, size and margins that suit your content, how to do it in a browser, and how the built-in options on Windows, macOS and the command line compare.
From characters to pages
A text file is just a sequence of characters and line breaks. It has no fonts, no page size, and no idea where a page should end. To make a PDF, a converter has to make those decisions:
- Font and size determine how many characters fit on a line.
- Margins and page size determine the width of the text block and how many lines fit on a page.
- Wrapping splits long lines so they fit within the margins, ideally at spaces rather than in the middle of words.
- Pagination moves to a new page when the current one is full.
The font choice matters more than people expect. Proportional fonts such as Helvetica or Times are pleasant to read for prose. Monospaced fonts such as Courier give every character the same width, which keeps columns in logs, code and text tables aligned.
| Content | Suggested font | Suggested size |
|---|---|---|
| Notes, letters, minutes | Helvetica (sans-serif) | 11-12 pt |
| Long-form writing, reports | Times (serif) | 11-12 pt |
| Logs, code, text-based tables | Courier (monospace) | 9-10 pt |
| Large-print handouts | Helvetica | 16-18 pt |
Create a PDF from text in your browser
Our Text to PDF tool builds the PDF on your device, so private notes are not uploaded.
- Open Text to PDF. Type or paste into the Your text box, or use Upload a .txt file below it. Click Load sample if you want to see how it works first.
- Choose a Font: Helvetica (sans-serif), Times (serif) or Courier (monospace).
- Choose a Font size from 9 pt to 24 pt.
- Set Margins from 10 mm to 30 mm. 20 mm is the default and suits most printing.
- Pick a Page size: A4 (210 × 297 mm) or US Letter (8.5 × 11 in).
- Leave Page numbers on to add a small "1 / 3" style number at the bottom centre of each page.
- Click Create PDF. A preview appears alongside, with the page count and file size.
- Click Download PDF to save it.
The tool wraps long lines to the margins and respects your own line breaks and blank lines, so paragraphs and lists stay the way you typed them. Changing any setting clears the old result so you never download an outdated version by accident.
One limitation to know about: the built-in PDF fonts cover Latin characters only. If your text includes Hindi, Chinese, Arabic or emoji, those characters are replaced with question marks and the tool warns you. For those scripts, use one of the print-based methods below, which rely on your system fonts.
Other ways to turn text into a PDF
Windows: Notepad and Microsoft Print to PDF
Open the file in Notepad, choose File → Print, and select Microsoft Print to PDF as the printer. You will be asked where to save the PDF. Notepad's page setup lets you change margins and add a header and footer. This handles any script your fonts support, but gives you little control over fonts per document.
macOS: TextEdit
Open the file in TextEdit and choose File → Export as PDF, or use File → Print and the PDF menu in the print dialog. You can set the font through Format → Font first.
Browsers
Most browsers can open a .txt file directly. Then Print → Save as PDF gives you a quick result, although long lines may not wrap nicely and you cannot choose the font.
Command line
For automated reports, tools such as pandoc can turn text or Markdown into a PDF, usually through a LaTeX engine. On Linux, enscript combined with ps2pdf is a classic pipeline for printing logs. These are better for scheduled or batch jobs but take some setup.
Tips for a better text PDF
Tabs and alignment
If your text uses tabs or spaces to line up columns, switch to Courier. In a proportional font those columns will drift out of line.
Very long lines
Log files often contain lines hundreds of characters long. A smaller Courier size keeps more on one line; otherwise the lines wrap, which is still readable.
Cleaning the text first
Text pasted from emails or PDFs often contains doubled spaces and broken lines. Clean it with Remove Extra Spaces or Remove Line Breaks before converting.
Want headings and formatting?
Plain text has no bold or headings. If you want styled output, write in Markdown and use Markdown to PDF, or start from a Word document with Word to PDF.
Going the other way
To get the words back out of a PDF later, use PDF to Text.
Frequently asked questions
How do I convert a Notepad file to PDF?
Either print it to Microsoft Print to PDF from Notepad, or upload the .txt file to a text-to-PDF tool, choose font and margins, and download the result.
Which font is best for a text PDF?
Helvetica is clean for notes and letters, Times suits longer reading, and Courier is best for code, logs and anything aligned in columns.
Can I add page numbers?
Yes. Keep the Page numbers option on and each page gets a small number at the bottom.
Why are some characters replaced with question marks?
The standard fonts built into PDF readers only include Latin characters. Use your system's print-to-PDF feature for other scripts or emoji.
Is there a size limit?
Uploaded .txt files can be up to 10 MB, which is far more text than most documents need.