Text to PDF

Paste text or open a .txt file, choose the font, size and margins, and save a PDF that keeps every line break and space. Your text stays on your device.

Updated by Khokhar Sab

How do I convert a text file to PDF?

Press Choose a text file, or Type or paste text to start from an empty page. Choose the paper, margins, text size and font; the preview updates straight away. Press Convert to PDF, then Download. The PDF keeps your file's name, so notes.txt becomes notes.pdf, and every line break stays where it was.

  1. Press Choose a text file, or Type or paste text.
  2. Pick Font (Monospace keeps columns lined up) and Text size.
  3. Pick Paper, Orientation and Margins.
  4. Press Convert to PDF, then Download.

How do I convert a TXT file to PDF on Windows or a Mac?

Both have a built-in route: open the file in Notepad or TextEdit, choose Print, and pick Microsoft Print to PDF or Save as PDF. That works but gives you little say over font and margins. This page does the same in any browser, with a live preview, monospace option and margin choice, on a phone too.

Which font is best for a text file PDF?

Use monospace for code, logs, config files and anything with columns lined up by spaces, because every character takes the same width. Use sans serif or serif for prose such as letters, notes and transcripts; they fit more words on a line and read more easily. Medium size suits most printing.

Measured on 2026-10-12 in Chrome 152 on an i5-8350U laptop, A4, normal margins, medium monospace text. Times are after the first conversion, which also loads the fonts and adds about a second.
Test filePagesPDF sizeTime
Letter (844 words)212 KB0.4 s
Server log, 1,000 lines40153 KB1.3 s
Server log, 10,000 lines3931.4 MB18.0 s

Can I convert JSON, CSV or log files to PDF?

Yes. Any plain text file works: .log, .csv, .xml, .yaml, .ini and more are shown exactly as written in monospace. JSON files are reformatted with two-space indents first, so a one-line export becomes readable. CSV comes out as text with commas; for a ruled table, open it in a spreadsheet first.

Limits and fixes

  • Characters: DejaVu fonts cover Latin, Greek and Cyrillic, and Noto Sans SC and KR cover Chinese, Japanese and Korean. Arabic shaping and emoji are left out for now.
  • Tabs are shown four spaces wide.
  • File size: up to 20 MB of text; split longer files first.
  • Encoding: files are read as UTF-8. Old files saved in another encoding may show odd accented letters; save them as UTF-8 first.

Frequently asked questions

Is it free?

Yes, with no sign-up, no watermark and no daily limit.

Will long lines be cut off?

No. Lines longer than the page width wrap onto the next line, and a line is never split across two pages.

Can I format the text, with bold or headings?

Use Markdown to PDF: write **bold** or # Heading and it is formatted in the PDF.

Does it work offline?

Yes, once the page has loaded. The fonts come from this site and no text is sent anywhere.

Can I add page numbers?

Not in this tool. Convert first, then add them with Add Page Numbers.

How this tool was built and tested