Convert text to PDF
Paste text or drop a .txt file and get a properly typeset PDF: pick the font, size, line height, margins, page size and optional page numbers.
- Runs in your browser
- Files are never uploaded
- Free, no account
0 words · 0 lines · 0 characters
Neutral sans serif — the safe default for notes and letters.
Nothing you type here is transmitted. The PDF is assembled by pdf-lib in this tab, which is why the tool keeps working offline.
How to turn text into a PDF
- Type or paste your text into the editor above, or drop a
.txt,.log,.csvor.mdfile to load its contents. - Choose a font, size, line height, page size and margin. The counters show the words, lines and characters you are about to typeset.
- Turn on page numbers if the document is long enough to need them.
- Set the file name, press Create PDF, and download.
Choosing a font
| Font | Character | Best for | Words per A4 page at 11 pt |
|---|---|---|---|
| Helvetica | Neutral sans serif, even colour on the page | Notes, letters, handouts, anything read on screen | ≈ 500 |
| Times | Serif, narrower letterforms | Long prose, essays, printed documents | ≈ 600 |
| Courier | Monospaced — every character the same width | Logs, code, fixed-width tables, ASCII art | ≈ 350 |
All three are part of the PDF standard's base 14 fonts, so they are never embedded in the file. A fifty-page document typically comes out under 100 KB, and it renders identically in every reader on every operating system.
How the text is laid out
Word wrapping uses the real metrics of the chosen font rather than a character count, so lines fill the column properly instead of breaking early or overflowing. Specifically:
- Words break at spaces, and the line is filled greedily up to the column width.
- A single token wider than the entire column — a long URL, a base64 blob, a checksum — is split by character so it can never run off the edge of the page.
- Hard line breaks in your input are respected exactly, which is what keeps logs, poetry and code readable.
- Blank lines become vertical space, so paragraphs stay visually separated.
- Tabs are expanded to four spaces, because PDF has no tab stops of its own.
- When the cursor reaches the bottom margin a new page begins automatically; page numbers, if enabled, are stamped afterwards once the total is known.
Margins and readability
A comfortable line length is roughly 60 to 80 characters. On A4 at 11 pt Helvetica, a 20 mm margin gives about 85 characters per line — fine for reference material, slightly long for sustained reading. If the document is meant to be read start to finish, either raise the margin to 30 mm or keep 20 mm and increase the font to 12 pt. Line height matters just as much: 1.4 to 1.5 is right for body text, while 1.15 to 1.25 suits dense logs where you want more on each page.
Which characters can be used
The standard PDF fonts are encoded with WinAnsi, covering the Latin alphabet, accented Western European letters, curly quotes, en and em dashes, the euro sign and common symbols. Characters outside that set — Cyrillic, Greek, Hebrew, Arabic, CJK, emoji — cannot be drawn without embedding a font file. Rather than failing, the converter transliterates what it safely can (stripping diacritics, mapping arrows and mathematical operators to ASCII equivalents) and then reports exactly how many characters it had to replace, so you can decide whether the output is fit for purpose.
Good reasons to make a PDF from text
- Sending something that must not be edited or reflowed — a quote, a statement, a set of instructions.
- Printing plain text properly, with real margins and page breaks rather than a browser's print stylesheet.
- Attaching logs to a ticket in a format that opens the same way for everyone.
- Archiving notes in a self-contained format that will still open in twenty years.
- Producing a clean handout from notes without opening a word processor.
Writing in Markdown? Markdown to PDF keeps your headings, lists and code blocks. Need the reverse direction? Use PDF to Text.
Questions
Which fonts can I use?
Helvetica, Times and Courier — the standard PDF typefaces built into every reader. Because they are not embedded, the resulting file stays only a few kilobytes and renders identically everywhere.
Is long text wrapped or cut off?
Wrapped, using real font metrics. Words break at spaces, and a single token wider than the column (a long URL or hash) is split by character so nothing ever runs off the page.
Does it keep my line breaks?
Yes. Hard line breaks are preserved and blank lines become paragraph spacing, so code snippets, logs and poetry keep their shape. Pick Courier for anything where column alignment matters.
Can I add page numbers?
Yes — turn on page numbers and each page is stamped centred in the bottom margin as "page / total" once the full document has been laid out.