# Convert TXT files to PDF

Turn .txt, .log and other plain-text files into tidy, paginated PDFs with selectable text. Pages are laid out in your browser, and nothing is sent to a server.

## In short

A .txt file has no pages or fonts of its own, so this converter sets the text on Letter or A4 pages with 0.75-inch margins, in Sans or Monospace at 10, 11, 12 or 14 pt. It reads UTF-8, UTF-16 with a byte order mark and Windows-1252, and each file becomes a separate PDF with selectable text.

## How to use TXT to PDF

1. **Drop in your text files**  
   Choose one or more .txt, .log, .csv or .md files, or drag them onto the tool. Each file is converted into a PDF of its own.
2. **Pick paper, typeface and size**  
   Select Letter or A4, Sans or Monospace, and a font size between 10 and 14 points. Monospace is the better match for code, logs and anything aligned with spaces.
3. **Create and save the PDFs**  
   Convert, then download each PDF separately or, after converting several files, grab them all at once in a ZIP.

## A worked example

`server.log` has 300 short lines. With Letter, **Monospace** and 11 pt, the writing area is 7 × 9.5 in (8.5 − 1.5 and 11 − 1.5). Each Courier character is 6.6 pt wide (0.6 × 11), so a line holds 76 characters (504 ÷ 6.6 ≈ 76.4) before wrapping, and the 15.4 pt line spacing (11 × 1.4) fits 44 lines per page (684 ÷ 15.4 ≈ 44.4).

The 300 lines therefore fill 7 pages (300 ÷ 44 ≈ 6.8), saved as `server.pdf`. On A4 the same settings give 73 characters and 47 lines per page.

## What it covers, and its limits

- Up to 500 files per run, each saved as its own PDF; [Merge PDF](https://pd00.com/merge-pdf/) joins them.
- Arabic, Hebrew, Hindi and Thai aren’t laid out correctly; emoji and symbols no bundled font has print as question marks.
- Text in other encodings, such as Shift-JIS, comes out garbled; re-save it as UTF-8, which covers all of Unicode.
- One typeface and size for the whole file: no bold, color or images.

## Sources

- [Letter (paper size)](https://en.wikipedia.org/wiki/Letter_(paper_size)), Wikipedia
- [International standard paper sizes (ISO 216)](https://en.wikipedia.org/wiki/ISO_216), Wikipedia
- [RFC 3629: UTF-8, a transformation format of ISO 10646](https://www.rfc-editor.org/rfc/rfc3629), RFC Editor

Links checked on October 10, 2026.

## About TXT to PDF

A text file has no pages. It is a stream of characters and line breaks, and its appearance depends on whichever editor opens it. This converter sets that stream on real pages, Letter by default or A4, with a 0.75-inch margin on every side. Long lines wrap at the margin rather than running off the edge, blank lines and leading indentation are preserved, and each tab becomes four spaces so indented blocks stay predictable. Wherever the file contains a form-feed character, a fresh page begins, the same convention old line printers followed.

You can choose between two typefaces. Sans, the default, suits notes, letters and prose. Monospace gives every character the same width, which keeps aligned columns, ASCII diagrams, source code and log output in their original shape. Font size can be 10, 11 (the default), 12 or 14 points.

Besides `.txt`, the tool accepts `.log`, `.csv` and `.md` files and treats every one as plain text. A CSV appears as its raw comma-separated lines, and Markdown keeps its pound signs and asterisks. If you want Markdown rendered with real headings, lists and tables, [Markdown to PDF](https://pd00.com/markdown-to-pdf/) is the right tool.

## When people use it

### A statement for a portal that wants PDF

An HR system, a school or an insurer asks for a PDF, but you wrote your statement in a notes app that saves .txt. Convert it and upload a file that opens the same way on every device.

### A log excerpt attached to a support ticket

Choose Monospace so timestamps and columns line up. Long error lines wrap at the margin instead of vanishing past the page edge, so whoever reads the ticket sees each message in full.

### Printing a stack of README or transcript files

Add a whole set of text files in one go, choose the paper your printer uses, and download a ZIP containing one PDF per file, ready to print or archive.

## How the text encoding is worked out

Plain-text files rarely say which encoding they use, so the converter looks for clues. UTF-8, the standard for modern editors, is assumed by default, and a UTF-8 byte order mark (BOM) at the start of the file is handled correctly. UTF-16 is recognised when the file opens with a BOM, which is how some Windows programs save “Unicode” text. Anything that fits neither is read as Windows-1252, the legacy encoding used by older Western-language Windows software.

That fallback is where garbled output comes from. A Russian file saved as Windows-1251 or a Japanese one saved as Shift-JIS will turn into a jumble of accented Latin letters and symbols. Open such a file in a text editor, save it as UTF-8, and convert it again.

## Which fonts end up in the PDF

| Text in the file | Font used | Effect on the PDF |
| --- | --- | --- |
| Latin alphabet | Helvetica (Sans) or Courier (Monospace) | Built into PDF readers, so no font is embedded |
| Greek and Cyrillic | Roboto (Apache-2.0) | Embedded, only the characters used |
| Chinese and Japanese | Droid Sans Fallback (Apache-2.0) | About 4 MB, downloaded to your browser only when the text needs it; embedded as a subset |
| Korean (Hangul) | Nanum Gothic (SIL Open Font License) | About 2 MB, downloaded to your browser only when the text needs it; embedded as a subset |
| Arabic, Hebrew, Hindi, Thai and similar | Not supported | Not laid out correctly |

Subsetting means the PDF carries only the glyphs your text actually uses, so a page of Japanese doesn’t drag the whole multi-megabyte font into the file. Right-to-left scripts and scripts that need shaping, such as Devanagari or Thai, would come out with letters in the wrong order or unjoined, so use an app that handles those scripts for such documents.

## What the finished PDF contains

Every character is real, selectable text, not a picture of text: you can search the PDF, copy from it and zoom in without blur. Files stay compact, especially pure Latin text, which needs no embedded font at all. A text file carries no styling, so neither does the result: one typeface, one size, no bold, color or images. If you want page numbers on the output, [Add Page Numbers](https://pd00.com/add-page-numbers/) can stamp them on afterwards, and a title for the document properties can be set with [Edit PDF Metadata](https://pd00.com/edit-pdf-metadata/).

## Cases this converter doesn’t cover

- **Spreadsheet-style tables.** A CSV is printed as raw lines with commas. For a proper grid, export the PDF from your spreadsheet app.
- **Formatted Markdown.** Headings, bold text and lists need [Markdown to PDF](https://pd00.com/markdown-to-pdf/).
- **Several files as one document.** Each text file becomes its own PDF; join them afterwards with [Merge PDF](https://pd00.com/merge-pdf/).
- **Huge logs on a phone.** Very long files need memory to lay out, and a computer copes with them better.

Your text is read and set on pages inside this browser tab; neither the file nor the finished PDF is uploaded. The [privacy page](https://pd00.com/privacy/#verify) lists checks you can run on that claim.

## Questions and answers

### How do I convert a text file to PDF?

Add the `.txt` file, choose the paper size, typeface and font size, then convert and download. Several files can be converted together and saved as a ZIP.

### Can the PDF use a fixed-width font?

Yes. Choose **Monospace** and Latin text is set in Courier, so columns and indentation built with spaces line up exactly as they did in your editor.

### Why do some characters come out garbled?

The file is probably in an encoding other than UTF-8, UTF-16 with a BOM or Windows-1252. Re-save it as UTF-8 in a text editor and convert it again.

### Does it handle Chinese, Japanese and Korean text?

Yes. For Chinese and Japanese the browser downloads Droid Sans Fallback, about 4 MB, and for Korean Nanum Gothic, about 2 MB, each only when the text contains those characters; only the characters used are embedded in the PDF.

### What about Arabic, Hebrew or Hindi?

Those scripts aren’t laid out correctly here. Right-to-left text and scripts with joined or reshaped letters need software built for them.

### How do I force a page break?

Put a form-feed character (U+000C) where the new page should begin. Without one, the text flows onto the next page whenever the current page is full.

### Is the text in the PDF searchable?

Yes. The PDF holds real text, so search, selection and copy-and-paste all work in any PDF viewer.

### Are my text files uploaded anywhere?

No. Conversion runs in your browser and the files never leave your device. The [privacy page](https://pd00.com/privacy/#verify) explains how to check.

Last updated October 11, 2026  
https://pd00.com/txt-to-pdf/
