Free text file to PDF converter
Text file to PDF, one drop
Drop up to 20 .txt files — or logs, Markdown notes, CSV exports and subtitle files — and take back one PDF each, a .zip of the batch, or a single merged document. The encoding is worked out for you, and every line break and indent lands where the file put it.
Conversion happens in this tab, so nothing is uploaded and nothing waits in a queue.
- Free
- No signup
- 20 files at once
- Merge into one PDF
- Encoding detected
Page setupA4 portrait · Sans-serif 11 pt · 1 in margins
Clean on screen — the default for notes and prose.
Nothing to convert from disk? The paste-your-text converter takes typed or pasted text instead.
How to convert a text file to PDF
Four steps, and two of them are optional.
Drop the text files onto the page
The file panel is already open below. Drag your .txt files onto it, or click to pick them — up to 20 at a time, 3 MB each. Log files, Markdown notes, CSV exports, JSON dumps and subtitle files count as text too and go through the same way.
Let the converter work out the encoding
Nothing to choose: a byte order mark decides when the file has one, otherwise the file is read as UTF-8, and one that fails a strict UTF-8 read falls back to Windows-1252 — the encoding behind most older Notepad documents. UTF-16 is caught by the zero bytes it leaves. The list shows which encoding each file was read as.
Set the page, or leave the defaults
Page setup covers A4, US Letter and US Legal, portrait or landscape, sans-serif, serif or monospaced type from 8 to 16 pt, and three margin widths. Tick the file-name header to stamp each document with the file it came from, and line numbers if the text is code or a log.
Download one PDF per file, a .zip, or one merged document
Each finished file gets its own Download button, and a batch of more than one offers all of them as a single .zip. Tick Merge into one PDF instead and the batch becomes one document, each file starting on a fresh page with page numbers running straight through.
Specifications
| Input | Plain-text files — .txt, .text, .log, .md, .markdown, .csv, .tsv, .json, .xml, .yml, .yaml, .ini, .cfg, .conf, .srt, .vtt, .sql and anything typed text/* |
|---|---|
| Batch size | 20 files per batch, 3 MB per file |
| Encoding handling | BOM first, then strict UTF-8, falling back to Windows-1252; UTF-16 detected without a mark |
| Output | One PDF per file, all of them as a .zip, or a single merged PDF with each file on a fresh page |
| Page sizes | A4, US Letter, US Legal — portrait or landscape |
| Typography | Sans-serif, serif or monospaced, 8–16 pt, three line spacings, three margins |
| Per-file extras | File-name header, line numbers, page numbers, 2/4/8-column tab stops |
| Text in the PDF | Real selectable, searchable text — not a scan or an image |
| Processing location | Your browser — no file is uploaded |
| Price | Free, no signup, no watermark, no file count cap per day |
Why a text file needs more care than pasted text
Text you paste arrives as characters the browser has already decoded. A file arrives as bytes with no label attached — the format has no header, no declared encoding, nothing that says which of a dozen byte-to-character mappings produced it. Guess wrong and a French quotation mark becomes two random letters, or the whole document turns into replacement characters.
So the bytes are examined before anything is drawn. A byte order mark settles it outright. Failing that, the file is decoded as UTF-8 in strict mode: modern files pass, and the ones that throw are almost always the older single-byte kind, which are read as Windows-1252 instead. UTF-16 gives itself away through the zero bytes between its characters. Whichever route a file takes, the list next to it names the encoding, so a wrong guess is visible rather than silent.
After that the layout is the same work as any other text: line endings normalised, tabs expanded to your tab stop, each line measured against the real metrics of the font it will be drawn in, then written as PDF text operators rather than an image. That is what keeps a converted log searchable in a reader and small enough to email.
Separate PDFs, a .zip, or one merged document
A batch of text files rarely wants the same treatment twice. Twenty daily logs going into a ticket are easier to attach as twenty PDFs, or as the .zip the tool offers once more than one file has finished. A manuscript split across chapter files, or a week of logs meant to be read in order, wants the opposite: tick Merge into one PDF and the batch becomes a single document, each file starting on a fresh page, page numbers running through the whole thing.
Merging keeps the order shown in the list, which is the order the files were added — so drop them in the sequence you want, or clear the list and start over if it comes out wrong. With the file-name header ticked, every page says which file it belongs to, which is the difference between a readable merged document and forty anonymous pages of timestamps.
Questions about converting text files to PDF
How do I convert a text file to PDF without installing anything?
Drop the file onto the panel on this page. The converter is JavaScript running in the tab you already have open, so there is nothing to install, nothing to sign up for, and the PDF appears with a preview attached before you commit to downloading it.
Can I convert several text files to PDF at once?
Yes. A batch holds up to 20 files of 3 MB each, and every one is converted with the same page setup. Take them as separate PDFs, grab the lot as a .zip, or tick Merge into one PDF for a single document where each file begins on its own page.
Does my text file get uploaded to a server?
No. The file is read with the browser's own file API and laid out on your processor; no part of it is sent anywhere, written to storage or logged. Close the tab and both the file and the PDF it produced are gone.
Which file types count as a text file here?
Anything that is plain characters: .txt, .text, .log, .md, .markdown, .csv, .tsv, .json, .xml, .yml, .yaml, .ini, .cfg, .conf, .srt, .vtt, .sql, plus anything the browser reports as text/*. A .doc, .docx, .rtf or .pdf is not plain text — those carry their own markup, and this converter would print the markup rather than the document.
Will an old text file with strange characters come out right?
Usually, yes. A file saved by Notepad in the Windows-1252 days has no encoding marker, so a naive UTF-8 read turns its accented letters into replacement characters; here a failed UTF-8 pass falls back to Windows-1252 instead, and the file list names the encoding each file was read as so you can check.
Does the PDF keep the file's line breaks and indentation?
Yes. Every line in the file is a line in the PDF, blank lines stay blank, leading spaces survive, tabs expand to the tab stop you pick (2, 4 or 8 columns), and a form feed starts a new page. A line too wide for the page wraps at a word boundary and carries the original indentation onto the continuation.
How big a text file can it handle?
3 MB per file — roughly three million characters, or several hundred pages of ordinary prose — and 1,000 pages per finished PDF. A file that would run past the page ceiling stops with an explanation instead of handing back a truncated document. Split it, or drop the font size, and it fits.
Can I put the file name on every page?
Tick “File name in a header” in Page setup and each page carries the name of the file it came from — worth doing on a merged batch, where twenty logs otherwise look alike. Page numbers in the footer are a separate checkbox and are on by default.
How do I convert a log file so 80-column output does not wrap?
Choose the monospaced font at 9 pt on A4 with normal margins: that fits 83 characters on a line. The Page setup panel prints the exact characters-per-line figure for whatever you pick, and landscape pages or narrow margins buy more room for wider output.
Where your files go
Nowhere. A dropped file is read by the browser and converted on your own processor: it is never uploaded, never written to storage, never logged, and gone from memory when the tab closes. There is no account for a document to be attached to, and the only request the page can make while converting is for one of its own font files — and only when your text reaches past the fonts every PDF reader already carries. More on that in how the converter works.