Text to PDF
Plain text into a formatted PDF.
Text content
0 chars · 0 BThe text never leaves your browser.
Paginated Letter-size PDF. Western European, Central European, Baltic, Turkish, Russian, Ukrainian, Bulgarian and Serbian text, box drawing and ← → ↑ ↓ ↔ ↕ are set in a monospace face. Other characters, in the text or its file name, can move the whole document to a proportional Noto face.
Upload a .txt file or paste text directly.
About this tool
Turn plain .txt files into a clean, paginated PDF with sensible typography — sources up to 2 MB, typeset right in your browser. The file stays on your device.
This tool processes files entirely on your device. Nothing is uploaded to a server.
More details
Paste text into the box or drop in a .txt file, press Create PDF, and you get a US Letter document with a page-of-total counter in the footer and a small heading on every page: the loaded file's name minus the extension, or "text" for pasted text. Long lines wrap at spaces, a word too long for one line is broken, tabs become spaces, Windows and old Mac line endings are normalised, and blank lines and leading indentation are kept.
Everything happens inside this browser tab, and your text is not uploaded anywhere. The cap is 2 MB: a file is checked by its size when you load it, and the text is checked again, in UTF-8 bytes, when you convert. A file that starts with a byte-order mark is read in the UTF-8 or UTF-16 encoding it declares; otherwise its bytes are inspected and it is read as UTF-16, UTF-8 or Windows-1252 (ANSI), and a note under the box names the encoding whenever it had to be assumed.
Western European text is set in Courier, one of the standard fonts PDF readers supply themselves, so no font is downloaded or embedded. Western European, Central European, Baltic, Turkish, Russian, Ukrainian, Bulgarian and Serbian text, box drawing and ← → ↑ ↓ ↔ ↕ are set in a monospace face. Where Courier cannot draw a character but that face can, as with Polish or Russian letters (even one in the file name), the monospace face (Geist Mono) is fetched from pdf.xyz's own server and embedded with only the characters you used, so columns aligned with spaces stay aligned as long as each line fits the page width. Any other character, such as Greek, Chinese or Bengali, in the text or its file name, switches the whole body to a proportional Noto face, and space-aligned columns then stop lining up.
When to use it
Keep a log or terminal session as a document
Server logs, build output and command transcripts in Western European characters keep their space-aligned columns in Courier, ready to attach to a ticket. Two things can still break a column: a line wider than the page wraps onto the next line, and a tab becomes a fixed run of spaces rather than a jump to a tab stop.
Print or share notes from a plain-text app
Notes exported from a phone app, a Notepad file or a text-only journal become numbered US Letter pages, each headed with the note's file name.
Submit text where only PDF is accepted
When a form or portal takes PDF and nothing else, convert the text first. Every page is headed with the file name, so give the file a different name before you load it if reviewers should see another title.
Typeset text beyond the Western European alphabet
Characters Courier cannot draw are set in the bundled monospace face (Geist Mono) when it can draw every one of them, and otherwise in one of 5 bundled Noto faces (Bengali; Latin, Greek, Cyrillic and Devanagari; Japanese; Korean; Chinese), picked to match the script; the conversion halts with an explanation naming any character none of them can draw.
What this tool can do
- Source limit
- Plain-text sources up to 2 MB, typeset in your browser.
- Page
- US Letter (8.5 × 11 in) portrait pages with 0.75 in margins and a page number (1 / N) at the foot of each page.
How it works
1Add your text
Drop a .txt file on the area marked "Drop a TXT file here, or browse", click browse to pick one, or paste straight into the Text content box. Loading a file replaces whatever is in the box.
2Check and edit it
Edit in the box if needed; the figure beside the Text content heading shows the character count and size as you type. The PDF heading is the loaded file's name even after you edit the text, or "text" if you only pasted.
3Convert the text
Click Create PDF. Its label switches to "Creating PDF…" until the document is ready; when the text or file name needs a bundled font (the Geist Mono monospace face, a Noto face, or both), those font files are fetched first, and they are reused for later conversions until you reload or close the tab.
4Download the paginated file
The "PDF created" panel lists the PDF's size and how many characters went in; press Download PDF. A file called notes.txt is saved as notes-pdf.pdf, and pasted text as text-pdf.pdf.
Common questions
Is my text uploaded to a server?
It is not: this tab assembles the PDF and the text stays on your device. Apart from the page's own code, the only thing it may request from pdf.xyz is font files, the Geist Mono monospace face, a Noto face, or both, when your text or file name needs characters beyond Western European. Each request asks for a face by its file name, so it reveals which kind of face was needed, but none of your words.
How large a text file can I convert?
Up to 2 MB, whether you pick a file or paste. A file larger than that on disk is turned away when you load it, and the text is measured again in UTF-8 bytes when you press Create PDF; anything over is refused with a message rather than half-converted. A Chinese or Bengali character takes several bytes in UTF-8, so such text reaches the cap at far fewer characters than English. Empty or whitespace-only text is refused too.
Which languages and scripts come out correctly?
Beyond Western European characters, text in Bengali, Latin, Greek, Cyrillic, Devanagari, Hiragana, Katakana, Kanji, Hangul and Han gets a bundled face embedded in the file: the Geist Mono monospace face where it can draw every character, as for Polish or Russian, and otherwise a Noto face. Arabic and Hebrew stop the conversion with an explanation: this tool places each line from the left margin rightward, so a right-to-left line would read in reverse. Emoji stop it too, because colour emoji are not embedded, so delete them before converting. Any other script without a bundled font is refused with the offending characters shown; the converter never swaps a character it cannot draw for a placeholder. One document cannot mix scripts that need different fonts, and the file name counts as part of the document here, so put, say, Chinese and Bengali passages in separate files.
Is there a setting for A4, another font or wider margins?
There is none: every PDF is US Letter with fixed margins and text size, and the page heading doubles as the document's Title property. For headings, lists or code blocks, write Markdown and use Markdown to PDF.
My file is .log, .csv or saved in another encoding. What do I do?
A dropped file is accepted when its name ends in .txt or .text or your system labels it plain text, and the browse dialog is filtered to .txt and plain-text files; for anything else, paste the contents into the box or rename the file to .txt. Text in UTF-8 or UTF-16, with or without a byte-order mark, and older ANSI (Windows-1252) or Latin-1 text files are read with their accented letters intact, and a note under the box names the encoding when it was assumed rather than declared. Other legacy encodings, such as Cyrillic Windows-1251 or Shift-JIS, are not detected: they are read as Windows-1252 and come out with the wrong letters, so re-save those as UTF-8 first. Any character that still could not be read is counted in a warning under the box, because the PDF would print a replacement mark (�) in its place.
Can I turn several text files into one PDF?
Not in one step: this tool converts one file or one pasted text at a time, and a multi-file drop loads just the first file. Either paste all the texts into the box one after another and convert once, or convert each file separately, reloading the page before the next one, then combine the results in order with Merge PDF.
Does Text to PDF work offline?
Not fully. The page and its processing engine load over the network, and parts of the engine are fetched the first time a step needs them. The processing itself runs on your device. Drawing text in a script outside the Western European alphabet downloads a matching font from our site the first time it is needed, and that step needs a connection.
How large can my file be?
Up to 2 MB per file.
What does the PDF from Text to PDF look like?
US Letter (8.5 × 11 in) portrait pages with 0.75 in margins and a page number (1 / N) at the foot of each page. There is no page-size or margin setting.
Related tools
All toolsGuides
All guidesNo sign-up required. Your files stay on your device until you run a tool.