Text to PDF turns plain text or a .txt file into a fixed-layout PDF document. Paste text into the editor or upload a file, choose font, size, margins and page size, then press Convert to PDF. The tool adds pagination, line wrapping and optional page numbers so the text becomes a shareable, printable document. Everything runs in your browser with pdf-lib — nothing is uploaded. The result is free, needs no signup, and works on phones, tablets and computers.
What is a Text to PDF converter?
A Text to PDF converter turns plain text or a .txt file into a fixed-layout PDF document. Plain text has no formatting — no bold, no images, no page breaks. The converter adds pagination, margins, font styling and optional page numbers so the text becomes a shareable, printable document that looks the same on every device [citation:6].
People search for “text to pdf” because they need to share notes, logs, readme files or code snippets with people who expect a document, not a raw text file. A PDF locks the layout, renders the same on Windows, macOS, Android and iOS, and is easy to email or upload to a portal. It also archives cleanly, which makes it the standard for records that must not change [citation:7].
The PDF format is an open standard published as ISO 32000. You can read its background in the Wikipedia article on PDF, and the plain text format history in the text file article. The converter uses pdf-lib to write the PDF entirely in the browser.
How do I convert text to PDF?
The conversion takes four steps and never requires an account. Here is the exact process.
- Add your textPaste plain text into the editor, drag a .txt file onto the upload card, or import a text file from Google Drive or Dropbox. The tool reads the content locally in your browser.
- Review the previewThe live preview shows exactly how the text will appear in the PDF. Check line breaks, special characters and overall layout before converting.
- Choose formattingSelect page size, orientation, font family, font size, margin and line spacing. Toggle page numbers and the timestamp footer.
- Convert and downloadClick Convert to PDF and watch the progress circle. Then download the finished PDF, preview it in a new tab, or start a new conversion.
Small documents convert in a second. Very long text files take longer because each line is measured and wrapped to fit the page width. Keep an eye on the progress circle for live status, and stay on the page until the download button appears.
What can the converter do?
Beyond basic conversion, the tool offers the controls that matter for readable, printable PDFs. This table lists each setting and its effect.
| Setting | Options | What it does |
|---|---|---|
| Input | Paste text, .txt file, Google Drive, Dropbox | Accepts plain text from any source without requiring a file. |
| Page size | A4, Letter, Legal, A3, A5 | Sets the paper size for every page. |
| Orientation | Portrait, Landscape | Portrait for prose; landscape for wide logs and code. |
| Font family | Helvetica, Times, Courier | Helvetica for reports, Times for prose, Courier for code and logs. |
| Font size | 8 to 18 pt | Balances readability against how much text fits on a page. |
| Margin | 40, 60, 80 pt | Adds white space around the text for printing and binding. |
| Line spacing | 1.2×, 1.5×, 1.8×, 2.0× | Controls vertical rhythm. Tighter spacing fits more lines; double spacing reads more comfortably. |
| Document title | Free text | Prints a centred heading with a coloured rule at the top of the first page. |
| Page numbers | On or off | Prints "Page X of Y" at the bottom centre of every page. |
| Timestamp footer | On or off | Prints the conversion date at the bottom of the last page. |
Once the PDF is ready, edit it with our PDF editor, lock it with protect PDF, or merge it with other files using merge PDFs.
Which page size should I choose for text to PDF?
Choosing the right page size prevents tiny text and awkward margins. Most of the world uses the ISO 216 “A” series. The United States and Canada use Letter and Legal. For logs and code, landscape orientation with A4 or A3 gives more horizontal room.
| Size | Millimetres | Inches | Best for |
|---|---|---|---|
| A5 | 148 × 210 | 5.83 × 8.27 | Short notes, receipts, quick references |
| A4 | 210 × 297 | 8.27 × 11.69 | Most documents, worldwide |
| A3 | 297 × 420 | 11.69 × 16.54 | Wide logs, code, large text |
| Letter | 216 × 279 | 8.5 × 11 | US and Canadian printing |
| Legal | 216 × 356 | 8.5 × 14 | Long documents, contracts |
Orientation works the same way across sizes. Choose Portrait for prose, notes and letters. Choose Landscape when the text contains wide tables, log lines or code that would wrap awkwardly in portrait [citation:16].
Why convert text to PDF?
People convert text to PDF every day, and the reasons go beyond tidiness. A PDF opens the same on any device, so the reader sees exactly what you intended. These are the most common situations.
Meeting notes
Turn quick notes into a shareable PDF that attendees can open on any device and archive for reference.
Code and logs
Use Courier font with landscape A3 to keep code aligned and log lines readable. Ideal for reports and bug tickets.
Readme files
Convert README or changelog text into a polished PDF for offline distribution or client handoff [citation:6].
Legal and official records
Archive plain-text statements, transcripts or declarations as PDFs with stable pagination and a timestamp.
Printing text
Print shops accept PDF but not .txt. Converting first gives you control over font, margins and page count.
Archiving
PDF is the standard archival format. Combine text with a timestamp for a self-contained record.
After conversion, continue the workflow with merge PDFs to combine multiple documents, or compress PDF to shrink email attachments.
Does the tool upload my text to a server?
No. The entire conversion runs inside your browser. The tool reads the text or .txt file on your device, lays it out with pdf-lib, and creates the PDF locally. Nothing is uploaded to any server, and nothing is stored after you close the tab. This makes the tool safe for confidential notes, logs, passwords and personal documents [citation:7].
- Local processing. The conversion code runs on your device, which also makes it fast on a good connection and usable on slow ones once the page has loaded.
- Direct cloud downloads. When you import from Google Drive or Dropbox, your browser fetches the file straight from that provider after you grant access.
- No account needed. You can convert without logging in. Read our privacy policy for full details about the site.
What formatting is preserved in the PDF?
Plain text has no bold, images or tables. The converter preserves what plain text offers — line breaks, paragraphs, blank lines and tabs — and adds the layout controls that make the result readable. Here is what you can expect.
| Text element | Preserved in PDF? |
|---|---|
| Line breaks | Yes — each newline becomes a new line |
| Blank lines | Yes — preserved as vertical space |
| Tabs | Yes — rendered as horizontal space |
| Special characters (Latin, Cyrillic, Greek) | Yes — Helvetica, Times and Courier cover these alphabets |
| Unicode beyond WinAnsi (CJK, Arabic, emoji) | No — rendered as "?" for compatibility |
| Bold, italic, colours | No — plain text has no inline styling |
| Images, tables | No — plain text cannot contain them |
Tip: for code and logs, choose Courier font and landscape A3. Courier is monospace, so columns stay aligned, and A3 gives long lines room to breathe without wrapping [citation:16].
Tips for the best PDF results
- Use Courier for code and logs. Monospace keeps columns aligned and makes patterns easy to spot.
- Use Times for prose. Serif fonts read more naturally for letters, notes and long text.
- Set 12pt with 60pt margins. That combination fits about 400 words per A4 page, close to a printed page.
- Increase line spacing for readability. 1.8× or 2.0× makes dense text easier to scan and annotate.
- Add a document title for finished work. It makes the PDF self-documenting without the source filename.
- Keep page numbers on for printed documents. They help anyone reviewing the PDF on paper.
- Preview before you share. Press Preview to open the PDF in a new tab and check the layout.
Common problems and quick fixes
Most conversion problems come from a handful of causes. Check this list before you start over, because each fix takes only a few seconds.
| Problem | Likely cause | Fix |
|---|---|---|
| Text overflows the page | A very long word or line without spaces. | The converter wraps at word boundaries. Reduce font size or switch to A3 landscape for long lines. |
| Accented characters appear as "?" | The character is outside the WinAnsi range (CJK, Arabic, emoji). | Use a browser print-to-PDF for those scripts, or convert the text to an image first. |
| Line breaks are lost | The source used Windows CRLF and the editor normalized it. | Paste again after converting the file to Unix line endings, or add blank lines manually. |
| PDF is very large | Thousands of lines at a large font size. | Reduce font size, or split the text into multiple conversions. |
| Text looks tiny | Font size is 8pt on A4. | Switch to 12pt or 14pt, or use A3 for more visible text. |
| Cloud import fails | The sign-in window was blocked or closed. | Allow pop-ups for this site, then press the Drive or Dropbox button again. |
If a file still fails, open it in a text editor and confirm it is a plain .txt file, not a .doc, .rtf or .pdf with a .txt extension. Re-save it as UTF-8 plain text and try again.
Text, Word and PDF compared
Plain text is the simplest document format. This tool converts it to PDF, the most universal output format.
| Format | Notes | Convert to PDF here? |
|---|---|---|
| TXT | Plain text. No formatting, no images. Universal and future-proof. | Yes |
| DOCX | Formatted Word document. Use the Word to PDF tool. | No |
| RTF | Rich Text Format. Use the RTF to PDF tool. | No |
| Fixed-layout output. | Already PDF |
For formatted documents, use Word to PDF or RTF to PDF. For images, use JPG to PDF or PNG to PDF. For data tables, use CSV to PDF. Each tool is optimized for its specific input format.
Related PDF tools
A good document workflow often needs more than one step. These tools work well after Text to PDF, and all of them are free.
You can also read practical guides on our blog, or learn more about the team on the About page.
Frequently asked questions
What is a Text to PDF converter?
Is the Text to PDF converter free?
Does the tool upload my text to a server?
How do I convert a TXT file to PDF?
Can I paste text instead of uploading a file?
Which fonts and page sizes are supported?
Can I add page numbers and a timestamp?
Does it work with non-English text?
What is the difference between Text to PDF and Word to PDF?
Can I convert multiple TXT files at once?
Does it work on iPhone and Android?
Can I edit the PDF after conversion?
Ready to turn your text into a PDF?
Paste your text or upload a .txt file, choose the formatting, and download a clean PDF in seconds. Free, private and built for every device.
Convert text now