Text to PDF
Convert plain text to a PDF document. Choose font size, page size, and margins, then download the PDF. All processing happens in your browser.
This converter turns plain text into a downloadable PDF document with your choice of page size, font size, and margins. Paste or type your content, pick your settings, and download a clean PDF that looks the same on every device. The entire conversion runs in your browser - nothing is uploaded to any server.
About Text to PDF
How Does Text to PDF Conversion Work?
The tool uses jsPDF, an open-source JavaScript library, to build the PDF directly in your browser. When you click the download button, it creates a new PDF document at the dimensions you selected, sets the font size, then walks through your text line by line. Each line is measured against the available page width (total width minus margins on both sides), and long lines are wrapped automatically. When the text exceeds the printable height of a page, a new page is inserted. Blank lines in your input are preserved as paragraph spacing, so the structure of your original text carries through.
Worked example: Say you paste 2,000 words of meeting notes and select A4, 12pt font, with normal (20mm) margins. The printable width is 210 - 40 = 170mm. At 12pt, each line holds roughly 85 characters. jsPDF wraps lines at word boundaries, producing about 45 lines per page. At roughly 10 words per line, that gives about 450 words per page - so 2,000 words will produce a 4 or 5-page PDF, depending on paragraph spacing.
Page Size Reference
The tool supports three page sizes. A4 is the international standard used in most countries, defined by ISO 216 (established in 1975). US Letter is the default in the United States, Canada, Mexico, and several Latin American countries. Legal is a taller US format used for contracts and court filings.
| Size | Dimensions (mm) | Dimensions (inches) | Where It's Standard |
|---|---|---|---|
| A4 | 210 x 297 | 8.27 x 11.69 | Most countries outside North America (ISO 216) |
| US Letter | 215.9 x 279.4 | 8.5 x 11 | US, Canada, Mexico, Philippines |
| US Legal | 215.9 x 355.6 | 8.5 x 14 | Legal documents, contracts (US) |
A4 is slightly narrower and taller than Letter. If you are printing a document for someone in another country, pick the size that matches their local standard to avoid cropping or scaling issues.
Font Size and Lines Per Page
Font size has the biggest effect on how much text fits on each page. Smaller fonts pack more content but are harder to read. Larger fonts improve readability but use more pages. Here is a rough guide for A4 with normal (20mm) margins:
| Font Size | Lines Per Page | Words Per Page | Best For |
|---|---|---|---|
| 8pt | ~70 | ~700 | Dense reference material, code printouts |
| 10pt | ~55 | ~550 | Compact documents, email archives |
| 12pt | ~45 | ~450 | Standard documents, meeting notes, letters |
| 14pt | ~38 | ~380 | Presentations, easy reading |
| 18pt | ~30 | ~250 | Large print, accessibility |
| 24pt | ~22 | ~180 | Posters, title pages, visually impaired readers |
Most printed business documents use 10-12pt. For large-print documents intended for people with low vision, 18pt is the widely accepted minimum. A 16pt font is sometimes used when space is limited, but 18pt or larger is the standard recommendation for accessibility.
Margin Settings Explained
Margins control the blank space between your text and the edge of the page. The tool offers four presets:
| Preset | Size | Printable Width (A4) | When to Use |
|---|---|---|---|
| Narrow | 10mm | 190mm | Maximum text per page, screen-only documents |
| Medium | 15mm | 180mm | Balanced look with more content |
| Normal | 20mm | 170mm | Standard for most printed documents |
| Wide | 25mm | 160mm | Documents that will be hole-punched or bound |
Normal (20mm) margins are a safe default. If the document will be printed and placed in a ring binder, go with wide margins to keep text clear of the holes. For screen-only PDFs where you want to fit as much text as possible, narrow margins work well.
Why Use PDF Instead of Plain Text?
PDF (Portable Document Format) was created by Adobe in 1993 and became an ISO standard in 2008 (ISO 32000-1). The format is designed so that documents look identical regardless of the device, operating system, or software used to view them. According to Smallpdf, over 2.5 trillion PDF files exist worldwide, with roughly 290 billion new PDFs created each year. Around 98% of businesses use PDF as their default format for external document sharing.
Plain text files (.txt) have no formatting at all - no page layout, no font control, no consistent appearance across viewers. Converting text to PDF gives it a fixed page layout that prints predictably and looks professional when shared. The resulting files are small (typically 10-50 KB for a few pages of text), widely supported, and easy to archive.
Text to PDF vs Other Document Formats
| Format | Formatting | Universal Viewing | File Size | Editable |
|---|---|---|---|---|
| Plain text (.txt) | None | Any text editor | Smallest | Yes |
| Text to PDF (this tool) | Page layout, font size, margins | Any PDF reader | Small (10-50 KB) | No |
| Markdown to PDF | Headings, bold, italic, code, lists | Any PDF reader | Small | No |
| Word document (.docx) | Full rich text, images, tables | Needs Word or compatible app | Medium | Yes |
| HTML | Full web formatting | Any browser | Small | Yes |
Use this tool when you have plain, unformatted text and just need it in a PDF wrapper. If your text includes Markdown formatting (headings, bold, lists), the Markdown to PDF converter will render those properly. To go the other direction and pull text out of an existing PDF, use the PDF to Text extractor.
Common Use Cases
| Scenario | Recommended Settings | Why |
|---|---|---|
| Meeting notes for distribution | A4/Letter, 12pt, normal margins | Standard, professional appearance |
| Archiving email threads | A4, 10pt, narrow margins | Fits more content per page, saves paper |
| Cover letter or formal letter | A4/Letter, 12pt, wide margins | Clean layout with breathing room |
| Large print for accessibility | A4, 18-24pt, normal margins | ADA-compliant readability |
| Code or log file printout | A4, 8-10pt, narrow margins | Maximises characters per line |
| Printing class notes or recipes | A4/Letter, 11-12pt, normal margins | Easy to read at arm's length |
How Big Will the PDF File Be?
Text-only PDFs are very small. A single page of text with embedded font data typically weighs 10-100 KB, depending on font complexity and compression. A 5-page document with nothing but text and standard fonts usually comes in under 50 KB. For comparison, a Word document with the same content might be 15-30 KB, and a plain .txt file with no formatting is the smallest of all (around 2 KB per page of text).
| Document Length | Approximate PDF Size (text only) | Pages at 12pt, A4 |
|---|---|---|
| 500 words | ~15 KB | 1-2 pages |
| 2,000 words | ~25-40 KB | 4-5 pages |
| 5,000 words | ~50-80 KB | 11-12 pages |
| 10,000 words | ~80-120 KB | 22-23 pages |
These sizes are small enough to email as attachments without worrying about file size limits. Most email providers allow attachments up to 25 MB, so even a very long text-to-PDF conversion will be well within that limit.
Limitations to Be Aware Of
This tool converts plain text only. It does not support:
- Rich formatting - no bold, italic, headings, or bullet points. For formatted text, use the Markdown to PDF converter instead.
- Images or tables - the PDF will contain text only. For documents with mixed content, a word processor or HTML-to-PDF tool is more appropriate.
- Custom fonts - the tool uses Helvetica, one of the 14 standard PDF fonts guaranteed to be available in every PDF reader. This keeps file sizes small and ensures consistent rendering everywhere.
- Right-to-left languages - Arabic, Hebrew, and other RTL scripts require specialised font shaping that the standard PDF fonts do not support.
- Tagged PDF structure - the output is not a tagged PDF (PDF/UA), which means it may not meet WCAG 2.1 accessibility requirements for screen readers. For accessible documents, use a dedicated document editor that supports PDF tagging.
For most everyday uses - archiving notes, printing emails, sharing text documents - these limitations do not matter. The tool is designed to be fast and simple for the most common case: turning unformatted text into a clean, downloadable PDF.
Tips for Better Results
- Check your line breaks first. If the source text has hard line breaks in the middle of sentences (common when copying from emails or terminals), it can produce awkward short lines in the PDF. Remove unwanted line breaks before converting.
- Use blank lines for paragraphs. The converter preserves blank lines as paragraph spacing. A single newline starts a new line; a double newline creates a visible gap between paragraphs.
- Preview the word count. The tool shows a live word and character count. Use the font size table above to estimate how many pages your document will be before generating.
- Pick the right page size for your audience. If the recipient is in Europe, Asia, or Africa, use A4. If they are in the US, Canada, or Mexico, use Letter.
- Try different font sizes. If your document is too long, drop to 10pt to fit more per page. If readability is the priority, bump up to 14pt or higher.
- Remove trailing whitespace. Extra spaces at the end of lines can cause uneven margins. Most text editors have a "trim trailing whitespace" option.
Need to combine several PDFs into one file after converting? The Merge PDF tool handles that. If you want to count words in your text before converting, the Word Counter gives a detailed breakdown including reading time and sentence count.
Sources
Frequently Asked Questions
How does the text to PDF conversion work?
The tool uses the jsPDF library to create a PDF document from your text. It handles line wrapping, page breaks, and margin settings automatically. The entire process runs in your browser.
Can I change the font?
The tool uses the standard Helvetica font for maximum compatibility. You can change the font size from 8pt to 24pt and adjust margins and page size.
What page sizes are available?
You can choose from A4 (210 x 297mm), US Letter (8.5 x 11in), or Legal (8.5 x 14in). All three are commonly used for printed documents.
Does it handle long text with multiple pages?
Yes. The tool automatically adds page breaks when the text exceeds a single page. You can paste text of any length and it will be split across as many pages as needed.
Is my text sent to a server?
No. The PDF is generated entirely in your browser using JavaScript. Your text never leaves your device.
Related Tools
Link to this tool
Copy this HTML to link to this tool from your website or blog.
<a href="https://toolboxkit.io/tools/text-to-pdf/" title="Text to PDF - Free Online Tool">Try Text to PDF on ToolboxKit.io</a>