Convert TXT to PDF

Turn a .txt file into a paginated PDF with margins and page numbers. The PDF is generated in your browser.

Drop your file here, or browse

Images, documents, spreadsheets, data files and subtitles. Your file stays on your device.

Your file is converted on this device and is never uploaded to a server.

Why convert text files to PDF

Plain text is universal, but it has no pages. Printing it depends on whatever program opens it, and sending it can look unprofessional. A PDF fixes the layout: the same pages, line breaks and margins on every device and printer.

This converter lays the text out on US Letter pages with three-quarter-inch margins, wraps long lines, breaks pages automatically and numbers them when there is more than one. It uses a monospaced font, so logs, code, ASCII tables and aligned columns look exactly as they do in your text editor.

TXT vs PDF at a glance

Main differences between the TXT and PDF formats
FeatureTXTPDF
Full namePlain text filePortable Document Format
TypeUnformatted textFixed-layout document
IntroducedAs old as computing (ASCII dates from 1963)1993
Created byNo owner; based on the ASCII and Unicode standardsAdobe; an open ISO 32000 standard since 2008
FormattingNone: characters and line breaks onlyExact layout with fonts, images and vector graphics
PagesNo page conceptMultiple fixed-size pages
Best forNotes, logs and text any program can openDocuments that must look identical everywhere
SupportUniversal: every browser, operating system and editorOpens everywhere; editing needs dedicated tools
MIME typetext/plainapplication/pdf

How to convert TXT to PDF

  1. Step 1: Select a .txt file

    Drop the file onto the converter. Have text copied instead? Paste it into Notepad or TextEdit and save it as .txt.

  2. Step 2: Keep PDF as the target

    PDF is preselected; HTML and Markdown are alternatives.

  3. Step 3: Convert

    The text is wrapped, paginated and numbered in Courier 10 point.

  4. Step 4: Download the PDF

    Print it, archive it or send it as a document.

How the PDF is formatted

Automatic pagination

Long files flow onto as many pages as they need; nothing is cut off.

Monospaced text

Columns and indentation stay aligned.

Page numbers

Multi-page documents get small page numbers at the bottom.

Tabs handled

Tab characters are expanded to four spaces for consistent alignment.

Good uses for TXT to PDF

  • Log files and reports. Share server logs or command output as a fixed document.

  • Source code printouts. Review code on paper with alignment intact.

  • Notes and drafts. Turn quick notes into a document you can attach to an email.

  • Legal and compliance records. Preserve text exports in a format that is hard to alter accidentally.

Supported characters

The PDF uses the standard fonts built into every PDF reader, which cover Western European alphabets: English, Spanish, French, German, Italian, Portuguese, Dutch and the Nordic languages, plus common symbols such as the euro sign, curly quotes and bullets. Fonts do not need to be embedded, which keeps files small.

Characters outside that set, including Greek, Cyrillic, Chinese, Japanese, Arabic, Hebrew, emoji and some Central European letters, cannot be drawn by those fonts and are replaced with a question mark. For documents in those scripts, open the text in a word processor and export to PDF from there.

Layout choices explained

Courier is used because a text file has no formatting of its own; a fixed-width font shows it the way a text editor does. Lines longer than the page width wrap to the next line rather than running off the edge.

Pages are US Letter. When printing on A4, choose fit to page in the print dialog and the text scales slightly without any loss.

  • Page size: US Letter, 0.75 inch margins.
  • Font: Courier 10 pt with generous line spacing.
  • Numbers: shown only when there are two or more pages.

Tips for text PDFs

  • Save your text as UTF-8 so accented letters convert correctly.
  • Insert blank lines where you want visual separation; they are kept.
  • Use Markdown to PDF or HTML to PDF for proportional fonts.
  • Compress the PDF only if it is very long; text PDFs are already small.

TXT to PDF questions

Will long text be cut off?

No. The converter adds pages automatically until all of the text is placed.

Which font does the PDF use?

Courier at 10 points, a monospaced font that keeps columns aligned.

Why do some characters show as question marks?

The built-in PDF fonts only cover Western European characters. Scripts such as Cyrillic, Chinese or emoji are replaced.

Can I change the page size?

The PDF uses US Letter. Most print dialogs can scale it to A4 or other sizes.

Is the text selectable in the PDF?

Yes. The PDF contains real text, so it can be searched and copied.

Is my file uploaded?

No. The PDF is created in your browser.

Related conversions

Tools for the next step