Convert any plain text file (.txt) or pasted text to a PDF directly in your browser. No upload required β everything runs locally using pdf-lib. Choose page size, font, font size and margins, then download immediately.
Also useful: JPG to PDF Β· Add Page Numbers to PDF Β· Compress PDF
Drop a .txt file or click to browse
Convert any plain text file to PDF β choose page size, font and margins
100% in your browser Β· Your file never leaves your device Β· No upload
Load your text
Drop a .txt file onto the upload area, click to browse, or switch to Paste mode and paste your text directly.
Choose options
Select A4 or Letter page size, Courier (monospace) or Helvetica font, and adjust font size and margins to taste.
Download the PDF
Click Convert to PDF. The text is word-wrapped, paginated and saved as a standard PDF that downloads immediately.
Need to add page numbers to the resulting PDF? Use PDF Page Numbers after converting. PDF Page Numbers
Long lines are automatically wrapped to fit the page width. Text is paginated across as many pages as needed β no content is clipped or lost.
Everything runs locally via pdf-lib in your browser tab. Your text file is never sent to any server, never stored, and requires no account or signup.
Choose A4 or US Letter page size, Courier (monospace, great for code) or Helvetica (clean sans-serif), font size from 7 to 24 pt and custom margins.
A plain text file (.txt) contains only characters β no page breaks, no fonts, no layout information. Converting it to PDF means deciding how to lay out that text on virtual pages: which font to use, how wide each line can be before wrapping, and how many lines fit on a page before starting a new one.
This tool uses pdf-lib entirely in your browser. It reads the file via FileReader.readAsText, embeds a standard font (Courier or Helvetica), and then iterates over every logical line. Long lines are split into visual lines by measuring the text width with font.widthOfTextAtSize() β the same approach used by professional typesetting tools. When a page fills up, a new page is added automatically.
Courier is a monospace font β every character has the same width. It is the best choice for code, log files, configuration files and anything where column alignment matters. Helvetica is a proportional sans-serif font that looks more like a standard document and fits slightly more text per line.
Up to 10 MB per .txt file, which covers millions of lines of text. All processing runs in your browser tab β keep the tab active while conversion is in progress. No text or file is ever sent to a server.