Skip to content
toolsbox

TXT to PDF

Turn plain text or .txt files into clean PDFs with real text — Arabic, Hindi and code friendly.

  • Free
  • No sign-up
  • Runs in your browser

What is a TXT to PDF converter?

A TXT to PDF converter turns plain text into a properly paginated PDF document that looks the same on every device and prints cleanly. Paste text straight into the box, or upload one or many text files: .txt, .log, .md, .json, .xml, .yaml, .ini and other code or configuration files. Each uploaded file becomes its own PDF, and when you convert several at once they download together as a single ZIP.

Unlike a screenshot or a "print to image", the result contains real text that you can select, copy and search with Ctrl+F. Long lines wrap at the margin, a form-feed character starts a new page, and you control paper size, orientation, font, font size, margins, line spacing and page numbers. Choose Monospace for code and logs, so columns and indentation line up exactly as in your editor, or Sans for ordinary documents.

Encoding is handled for you. The tool auto-detects UTF-8 and UTF-16 (with a byte-order mark) and falls back to Windows-1252, or you can pick an encoding manually for older Arabic, Cyrillic, Greek or Hebrew files. Everything runs in your browser; your text and files are never uploaded.

How to convert TXT to PDF

  1. 1

    Add your text

    Paste text into the box, or click "Upload .txt files" and select one or more files. Logs, Markdown, JSON, XML, YAML, INI and source code files are all accepted.

  2. 2

    Choose the page layout

    Pick the paper (A4, Letter, Legal, A3 or A5), portrait or landscape, and narrow, normal or wide margins. Landscape is handy for logs with very long lines.

  3. 3

    Set font and spacing

    Select Sans for documents or Monospace for code and logs, then adjust the font size and choose compact, normal or relaxed line spacing.

  4. 4

    Add page numbers and a title

    Switch on page numbers for a "1 / 9" footer, and use the file name as the title at the top of the first page if you want each PDF labelled.

  5. 5

    Check the encoding

    Leave text encoding on auto-detect. If accented letters or non-Latin script look wrong, pick the right encoding manually, for example Windows-1256 for an old Arabic file.

  6. 6

    Convert and download

    Create the PDF. A single file downloads directly; several files come as one ZIP with a PDF for each.

When to turn text into a PDF

Sharing server and application logs

Attach a readable, page-numbered log to a support ticket or incident report. Monospace keeps timestamps and columns aligned, and recipients can still search for an error code.

Printing source code and config files

Review a config, a JSON payload or a script on paper or annotate it in a meeting. Indentation is preserved, and long lines wrap instead of running off the page.

Archiving notes and Markdown drafts

Turn quick notes, meeting minutes or a README into a fixed document for a client folder or records system that expects PDFs.

Batch converting a folder of text files

Select 30 text exports at once and get 30 separate PDFs in one ZIP, each titled with its original file name.

Converting old non-Latin text files

Files saved years ago in Windows-1251, Windows-1256 or ISO-8859-7 often show as garbage in modern apps. Pick the right encoding and the PDF shows the Cyrillic, Arabic or Greek text correctly.

Languages, encodings and page breaks

The PDF supports Latin, Cyrillic, Greek, Arabic, Urdu, Persian, Hebrew and Hindi. Right-to-left lines in Arabic, Urdu, Persian and Hebrew are aligned to the right as they should be. Chinese, Japanese, Korean and emoji are not supported yet; if your text contains them, the tool tells you how many characters were skipped instead of silently dropping them.

Manual encodings cover the common legacy cases: Western (Windows-1252), Arabic (Windows-1256 and ISO-8859-6), Cyrillic (Windows-1251), Greek (ISO-8859-7), Hebrew (Windows-1255) and UTF-16. If auto-detect shows symbols such as "é" where you expect "é", the file is almost certainly UTF-8 being read as something else, or vice versa.

Need a page to end at a precise point? Insert a form-feed character (often shown as ^L in editors) and the next line starts on a new page. Many older reports and printer-ready log files already contain these.

Frequently asked questions

Are my text files uploaded to a server?

No. The conversion runs entirely in your browser. Pasted text and uploaded files are read and turned into PDFs on your own device, and nothing is sent to toolsbox. That makes it suitable for logs and configs that contain hostnames, keys or customer data.

Is the text in the PDF searchable?

Yes. The PDF contains real text, not an image of it, so you can search it, select and copy lines, and screen readers can read it aloud.

Can I convert several text files at once?

Yes. Select multiple files and each becomes its own PDF. With more than one file, the PDFs download together as a ZIP. To combine them into a single document afterwards, use Merge PDF.

Will code indentation and alignment be kept?

Choose the Monospace font and every character takes the same width, so indentation, ASCII tables and aligned log columns look exactly as they do in your editor. Very long lines wrap onto the next line rather than being cut off.

Why does my text show strange characters?

The file was saved in a different encoding from the one detected. Switch text encoding from auto to the right option, for example Windows-1251 for older Russian files or Windows-1255 for Hebrew, and the preview will correct itself.

Does it support Chinese, Japanese or emoji?

Not yet. Latin, Cyrillic, Greek, Arabic, Urdu, Persian, Hebrew and Hindi are supported. Chinese, Japanese and Korean characters and emoji are skipped, and the tool reports how many were left out so you know.

Related tools

More PDF tools →