Convert text to PDF

Type or paste text, or drop a text file, and get a PDF with the page size and margins you choose, made on your own device.

Turns typed or pasted text, or .txt, .md, .csv and .log files, into a PDF with the page size, margins and type size you choose. It is free, needs no account and adds no watermark, and your text is not uploaded: the PDF is laid out by code in this tab. Chinese, Japanese, Korean, Arabic, Hebrew, Thai and emoji cannot be drawn, and the result tells you when a file had them.

Drop text files hereor click to choose files. Batches welcome.

    0 characters

    Details

    Plain text only: Markdown is not formatted, a CSV is not turned into a table, and there are no pictures, bold or italics. Tabs become four spaces and a form-feed character starts a new page.

    Monospace is picked automatically for .csv and .log files and for text with columns lined up with spaces. Pick Sans-serif or Monospace to override it.

    Chinese, Japanese, Korean, Arabic, Hebrew, Thai, Indian scripts and emoji cannot be drawn. Each shows as � and the result says how many. Files up to 2 MB, about 300 pages.

    Working…

    Done

    Free, no ads. Support StayPut

    Your files are processed on this device and never sent to a server. Reload the page to clear everything from memory.

    What goes into the PDF

    The text is set as you wrote it: line breaks and blank lines are kept, indentation is kept, tabs become four spaces, and a form-feed character starts a new page. Long lines wrap at the margin, and a very long word or web address is broken at the margin instead of running off the page.

    It is plain text in and plain text out. Markdown is not formatted, so # and * stay as typed; a CSV is not turned into a table; there are no pictures, bold or italics.

    A worked example: a log file

    A server log has lines up to 80 characters, with columns lined up using spaces. Drop it and the page picks Monospace and 9 pt for you, because the file ends in .log. On US Letter with 1 inch margins that gives 86 characters to a line, so an 80-character line does not wrap and the columns stay lined up. On A4 it is 83 characters. If you switch to 11 pt Monospace, a Letter page holds 70 characters and the same lines wrap.

    Set a title if you want one: it is printed at the top of page 1, saved as the PDF’s title and used for the file name. Page numbers read "1 of 12" at the bottom and are on by default.

    Languages and symbols

    How it works

    1. Type or paste your text into the box, or drop one or more text files (.txt, .md, .csv, .log).
    2. Choose A4 or US Letter, the margins and the type. Monospace keeps columns lined up.
    3. Press Convert to PDF. Several files give one PDF each, and Download all zips them.

    In your browser, not on a server

    Your browser reads the text, works out its encoding (UTF-8, UTF-16 or Western European), expands tabs and splits it into lines. pdfmake (MIT, built on PDFKit) breaks the lines into pages in a background worker and embeds the Roboto font and a subset of DejaVu Sans Mono for monospace text and symbols. The PDF is written in your tab.

    Compared with upload-based tools: Your text goes from the box straight into a PDF made on this device, so a note, a draft or a log file is not sent to a server, and nothing is added to the page.

    Verify it yourself. Give the page a short while after one visit to save itself for offline use, then turn off Wi-Fi or switch to airplane mode and run the tool again. Or open your browser's developer tools (F12, or Cmd-Option-I on a Mac), pick the Network tab, and watch it while you convert. The panel above does the same count for you.

    Questions

    Is my text uploaded?

    No. The text is read, laid out and written as a PDF in this tab, so a note, a contract draft or a log file does not leave your device. After one visit and a short wait the page works offline.

    Which file types and encodings work?

    Plain text files such as .txt, .md, .csv and .log. UTF-8 and UTF-16 files are read correctly, and an older file that is not valid UTF-8 is read as Western European (Windows-1252), and the result says so. Word documents, PDFs and other binary files are refused with a message.

    Why is part of my text shown as a � mark?

    The built-in fonts cannot draw Chinese, Japanese, Korean, Arabic, Hebrew, Thai, Indian scripts or emoji. Those characters are replaced by � and counted in the result, so you can see what was affected. For a file that is mostly in one of those scripts, open it in your browser and use Print, then Save as PDF, which uses your device’s own fonts.

    Why do my columns not line up?

    Switch the font to Monospace. In a proportional font the letters have different widths, so columns made with spaces drift. Monospace is picked automatically for .csv and .log files and for text with aligned columns.

    Does it turn Markdown or a CSV into a formatted document or a table?

    No. The text is set as it is written, so headings keep their # signs and a CSV stays as lines of text with commas. Use Monospace for a readable CSV.

    How big a file can I convert?

    Up to 2 MB of text per file, which is about 300 pages. A PDF is laid out in your device’s memory, and larger files can make a tab run out of it, so split bigger files into parts. A phone may run out sooner.

    Do I need an account, and is there a watermark?

    No account and no sign-up: open the page and drop a file. Nothing is added to your file, so there is no watermark or logo. It is free, and your files are not uploaded.

    More PDF tools

    Popular conversions