Shard Tools

TXT to PDF

Turn a plain text file into a paginated PDF in your browser.

Maintained by Roshan.

Use TXT to PDF

Turns plain text into a paginated PDF in this tab. The result contains real selectable text rather than a picture of it.

Built-in fonts only, which limits the alphabetPDF's fourteen standard fonts cover Latin script and little else. Text in Chinese, Japanese, Korean, Arabic, Hebrew or Cyrillic, and any emoji, cannot be written with them - those characters become question marks and the count is reported rather than hidden.

Explore pdf tools

Find related browser-local tools for nearby tasks without starting another search.

Browse all pdf tools

About TXT to PDF

A plain text file has no pages, no margins and no notion of where one sheet ends and the next begins. Turning it into a PDF means making all of those decisions, which is why the results from different tools vary so much. The approach here is to typeset the text directly: each line is measured against the real font at the real size, wrapped to the margin, and placed on the page. Nothing is rendered to an image along the way, so the finished document contains genuine text that can be selected, searched and copied - the same property the original file had, carried across rather than thrown away. That distinction matters most for the things people convert text files into: logs to attach to a ticket, notes to circulate, exports that need to be readable in five years.

What happens to the PDF

  1. The file is read in this tab, and line endings are normalised so a text file written on Windows does not gain stray characters.
  2. Text is laid out with one of PDF's built-in fonts at the size you choose, and every line is measured against that actual font rather than an estimate, so nothing overruns the right margin.
  3. Long lines wrap at word boundaries. A single run too long for the line, such as a URL or a hash, is broken mid-string instead of being allowed to disappear off the edge.
  4. Blank lines in the source become paragraph gaps rather than empty rows, which keeps the spacing even.
  5. Pages break automatically at the bottom margin, and the page size and text size are yours to set before building.

Common txt to pdf jobs

Attaching a log file to a ticket

Systems that reject .txt attachments usually accept PDF. Choose a smaller text size for long lines so fewer of them wrap.

Turning notes into a shareable document

Build the PDF, then use the page-number tool if it runs to several pages. The text stays searchable in the reader either way.

Check before relying on the PDF

Questions about TXT to PDF

Will the text be selectable in the PDF?

Yes. The document is typeset with real fonts rather than rendered to an image, so text can be selected, searched and copied out.

Why did my non-English text turn into question marks?

The built-in PDF fonts encode Latin script only. Writing other scripts requires embedding a font file, which this tool does not do. The count of affected characters is always shown.

Does my formatting survive?

Line breaks and blank lines do. A plain text file carries no bold, italic or headings to preserve; use the Markdown converter if your file marks structure up.

How do I control where pages break?

Breaks happen automatically at the bottom margin. Choosing a smaller text size fits more per page; there is no manual page break in plain text.

Related tools

PDF to Text

Pull the text out of a PDF entirely in your browser. Reading order is preserved, scanned pages are reported honestly, and nothing is uploaded to a server.

Markdown to PDF

Convert Markdown into a paginated PDF with headings, lists and code blocks laid out as real text. Runs in your browser.

Add Page Numbers to PDF

Stamp page numbers onto an existing PDF in your browser. Choose the position, the starting number and which page to begin on.