Convert TXT to PDF
Convert TXT to PDF. Your text file becomes a multi-page PDF in a Unicode monospaced font, with long lines wrapped. Built in your browser, no upload.
How to convert TXT to PDF
Drop one or more .txt, .text or .log files above and press Convert. pdf-lib lays the text onto US Letter pages in your browser and you download a real PDF file, with no print dialog. Each line is placed on a fixed character grid, long lines wrap at the page width and the text flows across as many pages as it needs.
Fonts and character support
The text is set in 11 pt DejaVu Sans Mono, a monospaced font embedded in the PDF so it looks the same on every device. It covers Latin letters with accents, Greek, Cyrillic, Armenian and Georgian, box-drawing characters and many symbols. Characters it lacks, such as some Vietnamese letters, are drawn from Inter in the same grid cell. Chinese, Japanese, Korean, Thai, Devanagari, emoji and right-to-left scripts such as Arabic and Hebrew are not supported and print as a question mark or unshaped letters. For those, use HTML to PDF, which uses your system fonts.
Why convert a text file to PDF
A PDF is easier to share, print and archive than a .txt file, and it looks the same on every device. It works well for logs, code, transcripts, configuration files and READMEs you want to hand over as a fixed document. Only the characters you use are embedded, so the PDF stays small.
How pages are built
Text wraps at the page width and splits into pages on its own, so nothing runs off the edge. The monospaced grid keeps columns, ASCII tables and code indentation lined up. Tabs become four spaces and control characters are removed. The file is read as UTF-8.
Before you start
Input: TXT, TEXT, and LOG. Output: PDF. The settings appear before anything runs, so you can check them first. Your original file is never changed.
A document conversion may not keep every font, layout rule, embedded object, subtitle cue or app-specific feature. Read through the full result before you send or submit it.
Keep the original until you have opened and checked the result. The work happens in this browser tab, so the size you can handle depends on your device's memory, your browser and the file itself.
Steps to convert TXT to PDF
- Drop your .txt file into the box above, or click to pick it.
- Press Convert. The PDF is built in your browser with pdf-lib.
- Download the .pdf file.
Last updated · How we build and check tools · Report an error