Studio › File › TXT → PDF

TXT → PDF

Turns plain text into a laid-out PDF.

This tool runs on JavaScript. To use it, turn on JavaScript in your browser and reload the page.

A TIDY PAGE FROM PLAIN TEXT.

TXT → PDF turns plain text files into a PDF with a proper page layout. The text is written in the monospaced Courier font; that way the columns in log files, the indentation in code and the alignment of plain-text tables are not spoiled. Long lines are broken to fit the page, and when a page is full it moves on to a new one. Besides TXT, MD, LOG, CSV, JSON, XML, YAML, INI, SRT, VTT, HTML, CSS, JS, PY and SQL files can also be printed as plain text.

The page size is A4 or Letter, the type size between 7 and 20 points (11 by default) and the margin between 20 and 120 points (56 points by default, about 2 cm). The character encoding of the file is found by itself: UTF-8 and the old Turkish Windows encodings are read correctly, and Turkish letters are printed correctly. If the text has characters that Courier does not carry (₺, Cyrillic, Greek, Arabic, Indic and Asian scripts), it is written with the same settings in the monospaced DejaVu Sans Mono font; missing letters come from a fallback font, and Arabic and Indic letters join correctly. Color emoji may appear as boxes. Text files up to 8 MB can be uploaded. You can upload up to 20 files at once; they are all processed with the same settings, and several files download as a single ZIP.

The line wrapping calculation is exact, because in Courier every character is 0.6 of the font size wide: characters per line = (page width − 2 × margin) ÷ (0.6 × point size). On A4 with 11 points and a 56-point margin, 73 characters fit on a line; since the line spacing is 1.45 times the point size, 45 lines fit on a page. The letters ş, ğ, ı and İ, which are missing from PDF’s standard Latin encoding, are linked separately to the font’s glyph table, so Turkish text displays correctly without an embedded font. The encoding is tried in order as UTF-8 (with and without BOM), Windows-1254, ISO-8859-9 and Latin-1; the file can be up to 8 MB.

From start to finish

  1. Upload your text file. Drag the file in or select it; you can also paste the text into the box below. The encoding is found by itself.
  2. Choose the page size, the type size and the margin. A4 and 11 points is a good start for printing. For wide log lines, make the type smaller.
  3. Convert and download. Download the PDF once it is ready. The copy on the server is deleted when you leave the tool.

Frequently asked questions

Do Turkish characters come out correctly?

Yes. ş, ğ, ı, İ and the other Turkish letters are printed correctly; your file can be in UTF-8 or in the old Windows Turkish encoding.

Why a monospaced font?

In monospaced type every letter is the same width; logs, code and tables aligned with spaces stay aligned in the PDF too.

Does text in other scripts come out correctly?

Yes. If the text has a character that Courier does not carry, the PDF is written with fallback fonts: Cyrillic, Greek, Arabic, Indic and Asian scripts and ₺ show correctly, and Arabic and Indic letters join. Only color emoji may come out as boxes; if you want an editable document, use “TXT → Word”.

Does my file stay on the server?

No. Your file reaches the server only to be processed and is deleted when the job is done; the output is deleted too once you download it and leave the tool. You don't need an account, a name or an email address, and your files are never sent to a third-party service. It is free to use: we set no hourly or daily quota on the number of jobs, we don't make you watch an ad before processing, and we add no watermark to the output.

Other File tools

About us · Contact · Privacy & KVKK · Cookie Policy · Terms of use

Edit your file. Preview the result. Download when it's ready.Preparing your workspace…