TXT to PDF Converter
Convert plain text into a PDF document. Paste or upload text, choose a page size and font size, and download a ready-to-share PDF.
PDF Options
Recommended Settings
Pro Tips
- •Long lines are automatically wrapped to fit within the page margins based on your chosen font size
- •The text overflows onto additional pages automatically once it reaches the bottom margin
- •Choose A4 if your document needs to match European paper size conventions, or Letter for US standard printing
- •The generated PDF uses the standard Helvetica font, which is supported by every PDF reader
- •The whole document is generated locally in your browser using pdf-lib - nothing is uploaded anywhere
Most Popular
Most users stick with Letter size and 12pt font for a standard, readable document
When to Use This Tool
Turn plain text notes, drafts, or scripts into a shareable PDF document without opening a word processor.
Convert generated or scraped text output into a PDF report that's easy to archive, print, or email.
Convert a text file into a print-ready PDF with proper page breaks and margins for physical printing.
Preserve plain text content (logs, transcripts, code snippets) in a portable PDF format for long-term storage.
How It Works
Create a new PDF document in memory using the pdf-lib library
Embed the standard Helvetica font and calculate the usable line width based on the selected page size and margins
Split the input text into lines, wrapping any line that's too wide to fit within the margins
Draw each line onto the current page, starting a new page automatically when the bottom margin is reached
Save the finished PDF and trigger a download
100% Private
Files never leave your device. All processing happens locally in your browser.
Lightning Fast
Powered by pdf-lib for optimal performance on modern browsers.
Open Source
Built with verified, open-source libraries. Fully transparent.
Frequently Asked Questions
How does line wrapping work?
Each line of your input text is measured against the page's usable width at your chosen font size. If a line is too wide, it's broken at word boundaries into multiple lines, similar to how a word processor wraps text.
What happens with very long text?
The tool automatically adds new pages as needed - once the current page fills up, remaining text continues on a fresh page with the same margins.
Can I use a custom font?
This tool uses the standard Helvetica font built into every PDF reader, which keeps the output small and universally compatible. Custom font embedding isn't currently supported.
Is my text uploaded to a server?
No. The entire PDF is generated locally in your browser using the pdf-lib library. Your text never leaves your device.
Are blank lines and paragraph breaks preserved?
Yes. Each line in your input, including empty lines, is preserved as its own line in the output PDF.