Text to PDF Converter
Type or paste plain text, or load a .txt file, and download a PDF with your choice of font, size, margin, and orientation. Runs entirely in your browser.
This works right here on your device — nothing gets sent out.
Example shown — replace it with your own text.
Preview
How it works
- Type or paste your text, or load it from a .txt file.
- Choose a font family, font size, page size, margin, and orientation — the preview updates automatically.
- Click Download PDF to save the formatted file.
How the layout is built
Plain text has no line-wrapping information of its own, so the tool measures each word at your chosen font size and packs words onto a line until the next one would overflow the page's usable width (the page width minus a fixed margin on each side):
usable width = page width − (2 × margin)
Your own line breaks (blank lines between paragraphs, list items) are always kept as-is — only lines that are too long for the page get wrapped further. When a page fills up, a new one is added automatically.
FAQ
Is my text uploaded anywhere?
No. The PDF is built entirely in your browser using the pdf-lib library — your text never leaves your device, whether you type it or load it from a .txt file.
Can I load an existing .txt file instead of typing?
Yes — use "Or load a .txt file" to read a plain text file straight into the text box, then edit it if you like before downloading.
Does it support Word documents or rich formatting like bold and colors?
No — this tool is for plain text only. It handles font family, size, margin, page size, and orientation, and wraps long lines automatically, but it doesn't read .docx files or preserve bold/italic/colored text, since plain text has none of that to preserve.
Can I change the font, margins, or page orientation?
Yes — choose Helvetica, Times Roman, or Courier for the font family, Narrow, Normal, or Wide for the margin, and Portrait or Landscape for orientation. The preview updates automatically so you can see the result before downloading.
Why does a very long line get split across the page?
Lines are wrapped automatically to fit the page width you chose, the same way a word processor wraps text — your original line breaks (paragraphs, list items) are kept, only overly long lines are broken further.
How many pages can the PDF have?
As many as your text needs — a new page starts automatically whenever the current one runs out of room, so there's no length limit built into the tool.
How we compare
| Feature | Online Tool Store | CodeShack | Smallpdf |
|---|---|---|---|
| No file upload — runs in your browser | ✓ | ✓ | ✗ |
| Live preview before downloading | ✓ | ✓ | ✗ |
| Choice of font family, margin, and page orientation | ✓ | Font choice only — no page margin or orientation controls | No native control — must convert via Word/Docs first |
| Free, no sign-up, no daily limit | ✓ | ✓ | Daily task limit on free plan |
CodeShack's rich text editor is great if you need bold, colors, and headings, but it doesn't offer page margin or orientation control. Smallpdf can't convert a .txt file directly — you have to paste it into Word or Google Docs first. Text to PDF Converter keeps it to one page: pick your font, margin, page size, and orientation, see the result instantly, and download — nothing ever leaves your device.