# TXT to PDF

Convert a txt file to PDF with every line break and space kept exactly. Free, no signup, and the file is never uploaded.

Canonical page: https://filetity.com/txt-to-pdf

## Capabilities

- Free: Yes, with no watermark and no page limit.
- Account required: No. There is no account system.
- Processed on device: Yes. The file is read by your browser and never uploaded. There is no server to send it to.
- Formats: TXT and LOG in. A PDF out, saved through your browser's print dialog, with the text still real text.
- Limits: The last step is the browser's print dialog rather than a download, so you choose Save as PDF there. There is no styling to apply beyond the typeface, because a text file carries none; if you want headings and tables, the file you have is probably markdown and /markdown-to-pdf reads those.
- Mobile: Yes, on any modern mobile browser. Large files are limited by the memory the phone gives the browser.
- Offline: Yes. Nothing is downloaded to make this work, so it keeps working with no network connection once the page has loaded.

## Questions

### Will my line breaks survive?

Yes, exactly, and that is the reason this page exists separately from the markdown one. Markdown treats a single line break as an ordinary space and joins the lines into a paragraph, which would turn a poem, an address block or a log into a wall of prose. Nothing here is parsed, so every break and every run of spaces is kept.

### Should I pick monospace or serif?

Monospace if the file has anything lined up in columns: a log, a table drawn with spaces, code, a directory listing. Every character is the same width, so the alignment holds. Serif if it is prose meant to be read, like notes or a letter, where a proportional face is easier on the eye. Monospace is the default because misaligned columns are a worse failure than slightly harder reading.

### What happens to very long lines?

They wrap onto the next line rather than running off the right edge. The alternative keeps the file looking more like the original and silently loses everything past the margin, which is not a trade worth making for a document you are printing to keep.

### Why does the print dialog open instead of downloading?

Because the browser's print engine is what makes the PDF, and it is better at breaking pages than anything that would fit in a web page. Choose Save as PDF as the destination; in Chrome, unticking Headers and footers keeps the date and URL off the pages.

## Related tools

- [Markdown to PDF](https://filetity.com/markdown-to-pdf): Turn a markdown file into a PDF, with headings, tables and code kept.
- [Word to PDF](https://filetity.com/word-to-pdf): Convert a Word document to PDF, keeping the text as real text.
- [PDF to Text](https://filetity.com/pdf-to-text): Pull the text out of a PDF, page by page, and copy it or save it as .txt.
