TXT to PDF

Convert text to a clean, printable PDF with selectable text.

Your plain text notes and log files are converted into a printable PDF locally in your browser without server uploads. See our privacy policy.

Your plain text notes and log files are converted into a printable PDF locally in your browser without server uploads. See our privacy policy.

How to convert TXT to PDF

  1. Paste your text into the editor box or click Choose a file to open a local .txt or .log file.
  2. Select A4 or US Letter page size.
  3. Press Make PDF and then Save PDF to download the finished PDF.

Plain text (.txt) files have no page margins, no paper size, and no fixed line wrapping—when you open a `.txt` file on different devices or print it directly from Notepad, lines often run off the edge of the sheet or print in inconsistent fonts. Converting a `.txt` file to PDF sets the text in a clean, fixed-width Courier font with uniform margins, automatic line wrapping at the page edge, and selectable vector glyphs so it prints identically on every printer.

Worked example: Converting a 220-line server error log (.txt) to a US Letter PDF

Suppose you need to attach a diagnostic log excerpt (`nginx_error_excerpt.txt`, 220 lines, 14.5 KB) to an incident postmortem form that only accepts `.pdf` attachments:

2026/11/14 08:14:22 [error] 1048#1048: *88219 upstream timed out (110: Connection timed out)
2026/11/14 08:14:25 [warn]  1048#1048: *88224 client request body is buffered to a temp file

Selecting US Letter and clicking Make PDF wraps lines exceeding the page width onto indented continuation lines and paginates the 220 lines across 5 US Letter pages (24.1 KB). Every timestamp and error code stays searchable with `Ctrl+F` and copyable as plain text.

Limits and what this tool cannot do

  • Fixed-width Courier font (no bold, italic, or custom fonts): Because plain `.txt` files carry no styling metadata, the entire document is set in standard monospaced Courier so ASCII tables, code indentation, and columns stay aligned.
  • Western European Latin character set (WinAnsiEncoding): The built-in PDF Type 1 Courier font supports ASCII and Western European accented characters. Characters from non-Latin scripts (such as Hindi, Chinese, Arabic, Cyrillic, or emoji) are replaced with `?` and counted in the summary notice. To convert non-Latin `.txt` files to PDF, open the text file in your browser tab or word processor and choose Print → Save as PDF.
  • Form-feed (`\f`) characters: Legacy ASCII form-feed characters are treated as whitespace rather than forced page breaks.

Questions

Why is the text set in a monospaced Courier font in the PDF?

Plain .txt files often rely on space alignment for columns, ASCII diagrams, and log timestamps. A fixed-width font ensures every character occupies the exact same horizontal width so columns do not shift.

How can I convert a TXT file containing Hindi, Arabic, or Chinese text to PDF?

Because this lightweight browser tool uses the built-in PDF WinAnsi Courier font without bundling 20 MB of Unicode font files, non-Latin scripts show as question marks. For Unicode scripts, open the .txt file directly in a Chrome or Edge tab and press Ctrl+P (Save as PDF).

Is the text in the output PDF selectable and searchable?

Yes. The PDF stores real text characters rather than page images, so Ctrl+F search and copy-paste work in all PDF readers.

Are my text files uploaded to any server?

No. Your text is formatted into a PDF inside your browser's local memory and never leaves your device.

Last reviewed .

Related converters and guides