A plain text file (.txt) becomes a PDF when the tool reads each line of text, wraps it to the page width at the selected font size, and writes the result into a PDF document using standard page dimensions. The output is a clean, print-ready PDF with proper margins and automatic page breaks. The entire conversion happens in your browser.

Free Text to PDF — runs in your browser

Upload a .txt file or paste text. Choose font and page size. No account, no upload.

Convert text to PDF

When would you convert text to PDF?

Plain text files are useful for storage and editing, but they are awkward to share, print, or archive because there is no fixed page layout. Converting to PDF fixes that. Common use cases include:

  • System logs and error reports — convert a log file to PDF for inclusion in a bug report or support ticket
  • Config files — share a server configuration as a PDF snapshot for documentation or review
  • Interview notes or meeting records — text notes typed during a meeting become a shareable document
  • Email drafts and correspondence — text files written offline can be converted for email attachment
  • Code snippets — short scripts or code excerpts formatted as a PDF for distribution (for syntax-highlighted output, use the Code to PDF tool instead)
  • Plain-text books and manuscripts — long-form text documents need page layout before they can be printed or read comfortably

How to convert a text file to PDF step by step

1

Open the Text to PDF tool

Go to fixmypdf.tech/tools/text-to-pdf.html.

2

Upload your text file or paste directly

Drag a .txt file onto the drop zone, or simply type or paste your text into the input area.

3

Set your formatting options

Choose page size (A4 or Letter), font, font size, and margin width. The preview panel updates in real time.

4

Click Convert to PDF

The tool paginates the text and writes the PDF.

5

Download

Click Download to save the PDF.

Which font to choose

Font Best for
HelveticaGeneral text, reports, notes — clean and readable at any size
Times New RomanFormal documents, letters, academic text — traditional look
CourierCode, logs, config files — monospace preserves indentation and alignment

These are the three core PDF standard fonts. Using them means the font does not need to be embedded in the PDF, which keeps the output file small.

A4 vs Letter: which to use

A4 (210 × 297mm) is standard in Europe, Asia, Australia, and most of the world. US Letter (8.5 × 11 inches, or 216 × 279mm) is used in the United States and Canada.

If you are unsure, use A4 — it is the ISO standard and will print correctly on Letter paper with a small margin of extra space at the bottom. Letter paper is slightly wider and shorter than A4, so a Letter PDF printed on A4 may clip slightly on the sides.

Converting code and log files

For code files, always choose Courier font. This is a monospace font, meaning every character takes the same horizontal space — this is essential for preserving code indentation and aligning columns in tabular data.

Set a smaller font size (10pt or 9pt) if your code lines are long, so they fit within the page width without wrapping awkwardly.

If you want syntax highlighting (coloured keywords, strings, and comments), use the Code to PDF tool instead. It supports 20 programming languages with colour themes and produces a much more readable output for code sharing.

Convert text to PDF now

Upload a .txt file or paste text. Runs in your browser, no file upload.

Open Text to PDF

Frequently asked questions

What text file formats can I convert to PDF?
Plain text (.txt) only. For Word documents (.doc, .docx), rich text (.rtf), or Markdown files, different tools are needed. FixMyPDF has a Markdown to PDF converter and an HTML to PDF converter for formatted content.
Will the text wrap automatically to fit the page?
Yes. Long lines wrap automatically at the page margin. Your original line breaks are preserved; new page breaks are added when a page fills up.
Can I convert a large text file with thousands of lines?
Yes. Processing happens in your browser with no server limits. Very large files may take a few seconds to paginate.
Can I convert code or log files to PDF?
Yes. Select the Courier font to preserve indentation. For syntax-highlighted output, use the Code to PDF tool.
What fonts are available?
Helvetica (sans-serif), Times New Roman (serif), and Courier (monospace). These are PDF standard fonts that work without embedding, keeping file sizes small.
Is it safe to convert a text file containing sensitive information?
Yes — the conversion runs entirely in your browser. Your text never reaches a server.