A plain text file (.txt) becomes a PDF when the tool reads each line of text, wraps it to the page width at the selected font size, and writes the result into a PDF document using standard page dimensions. The output is a clean, print-ready PDF with proper margins and automatic page breaks. The entire conversion happens in your browser.
Free Text to PDF — runs in your browser
Upload a .txt file or paste text. Choose font and page size. No account, no upload.
Convert text to PDFWhen would you convert text to PDF?
Plain text files are useful for storage and editing, but they are awkward to share, print, or archive because there is no fixed page layout. Converting to PDF fixes that. Common use cases include:
- System logs and error reports — convert a log file to PDF for inclusion in a bug report or support ticket
- Config files — share a server configuration as a PDF snapshot for documentation or review
- Interview notes or meeting records — text notes typed during a meeting become a shareable document
- Email drafts and correspondence — text files written offline can be converted for email attachment
- Code snippets — short scripts or code excerpts formatted as a PDF for distribution (for syntax-highlighted output, use the Code to PDF tool instead)
- Plain-text books and manuscripts — long-form text documents need page layout before they can be printed or read comfortably
How to convert a text file to PDF step by step
Open the Text to PDF tool
Upload your text file or paste directly
Drag a .txt file onto the drop zone, or simply type or paste your text into the input area.
Set your formatting options
Choose page size (A4 or Letter), font, font size, and margin width. The preview panel updates in real time.
Click Convert to PDF
The tool paginates the text and writes the PDF.
Download
Click Download to save the PDF.
Which font to choose
| Font | Best for |
|---|---|
| Helvetica | General text, reports, notes — clean and readable at any size |
| Times New Roman | Formal documents, letters, academic text — traditional look |
| Courier | Code, logs, config files — monospace preserves indentation and alignment |
These are the three core PDF standard fonts. Using them means the font does not need to be embedded in the PDF, which keeps the output file small.
A4 vs Letter: which to use
A4 (210 × 297mm) is standard in Europe, Asia, Australia, and most of the world. US Letter (8.5 × 11 inches, or 216 × 279mm) is used in the United States and Canada.
If you are unsure, use A4 — it is the ISO standard and will print correctly on Letter paper with a small margin of extra space at the bottom. Letter paper is slightly wider and shorter than A4, so a Letter PDF printed on A4 may clip slightly on the sides.
Converting code and log files
For code files, always choose Courier font. This is a monospace font, meaning every character takes the same horizontal space — this is essential for preserving code indentation and aligning columns in tabular data.
Set a smaller font size (10pt or 9pt) if your code lines are long, so they fit within the page width without wrapping awkwardly.
If you want syntax highlighting (coloured keywords, strings, and comments), use the Code to PDF tool instead. It supports 20 programming languages with colour themes and produces a much more readable output for code sharing.
Convert text to PDF now
Upload a .txt file or paste text. Runs in your browser, no file upload.
Open Text to PDFFrequently asked questions
What text file formats can I convert to PDF?
Will the text wrap automatically to fit the page?
Can I convert a large text file with thousands of lines?
Can I convert code or log files to PDF?
What fonts are available?
Is it safe to convert a text file containing sensitive information?
Related tools