Open Editor
Utility
4 min read

How to Convert TXT to PDF for Free, and What Goes Missing

Turning a .txt file into a PDF takes a few seconds, but the PDF can only show characters its font contains. Here is what we tested, what came out right and the scripts that came out blank.

Short answer: ClearConvert turns a .txt file into an A4 PDF inside your browser, so the text is never uploaded. Latin, Cyrillic and Greek text comes out correctly, and Arabic and Hebrew are written right to left. Chinese, Japanese, Korean and Hindi text and most emoji come out blank, with no warning, because the font in the PDF does not contain those characters.

What the Conversion Does

For a .txt file, PDF is the only output ClearConvert offers. The PDF is A4, set in DejaVu Sans at 10 pt, with 18 mm margins and 6 mm between lines, which fits 43 lines on a page. Long lines wrap inside the margins. The file is named after the original with .pdf at the end, and the title and author fields in the PDF are empty.

We ran the live tool in a headless Chrome browser on a set of test files, then read the PDFs back with a PDF library and looked at the rendered pages. The files were small and made by us, so they show how the tool behaves, not how every real document will look.

Which Scripts Come Out Right

TextIn the PDF
English, curly quotes, em dashCorrect
Serbian Latin (čćžšđ) and Serbian CyrillicCorrect
Russian, GreekCorrect
Polish, Czech, Turkish, VietnameseCorrect, including the accents and dotted and dotless i
Arabic, HebrewWritten right to left, and the Arabic letters are joined. This looked right in our render, but no native reader checked it.
HindiBlank
Chinese, Japanese, KoreanBlank
Emoji😀 and 👍 blank. ❤️ appeared as a black heart.
The unsupported scripts do not show boxes or question marks. The characters are simply missing, so a quick look at a page of mostly Latin text will not reveal that a Chinese name or an emoji disappeared.

The reason is the font. DejaVu Sans covers Latin, Cyrillic, Greek, Arabic and Hebrew, among others, but it has no Chinese, Japanese, Korean or Devanagari (Hindi) characters, and no colour emoji. If your text uses those, check the PDF before you send it. We did not test other converters on these files, so we cannot say which ones handle them.

Tabs, Spaces and Line Endings

  • Tabs become four spaces each. They are not tab stops, so a column of tab-separated data will not line up the way it did in a text editor.
  • Leading spaces are kept, so indented code stays indented.
  • Windows (CRLF) line endings and a UTF-8 byte-order mark are handled: the PDF was identical to the one from a plain file.
  • A form feed or vertical tab becomes a space. A lone carriage return (the old Mac line ending) starts a new line.
  • Non-breaking spaces and zero-width spaces do not cause trouble.

While testing for this post we found that an earlier version of ClearConvert cut off everything after a tab character, and the same happened with form feeds and vertical tabs. A line such as “a, tab, b” came out as just “a”. We fixed it on October 21, 2026, and re-ran the tests on the live site to confirm that every one of those lines now appears in full. If you made a PDF from a text file with tabs before that date, it is worth converting it again.

Long Lines and Large Files

  • A 300-character word with no spaces was split into several lines at the margin, with every character present and nothing running off the page.
  • A 600-character sentence wrapped at the spaces into seven lines.
  • A file of 5,000 lines became a 117-page PDF of 940 KB, ending with the last line, and the conversion took under a third of a second on our test machine.
  • A short three-paragraph file still produced a PDF of about 140 KB, because the whole font is embedded in every file.

Empty Files

A file that is empty, or contains only spaces and blank lines, produces no PDF. The page shows “Error: File is empty.” and the message “Conversion failed — File is empty.”

Is the Text Real Text?

Yes. The PDF contains no images, and the text can be selected and extracted. One caveat from our test: when we extracted the Arabic line, it came out as joined letter forms wrapped in direction marks, not the original characters. Copying Arabic from the PDF back into a text file may therefore not give you the text you started with. Latin, Cyrillic, Greek and Vietnamese text extracted exactly as typed.

Does the File Leave Your Device?

Not in our test. Converting one file made a single network request, which downloaded the font from the cdn.jsdelivr.net network. No request contained the text of the file or its name. You can repeat the check by opening the developer tools, going to the Network tab and converting a file. For why this matters with private documents, see what happens to a file after you upload it.

How to Do It

  1. Open ClearConvert and load your .txt file.
  2. Choose PDF as the output and convert.
  3. Download the PDF and look at it, especially if the text contains Chinese, Japanese, Korean, Hindi, emoji or tab-separated columns.

To go the other way, see converting a PDF to plain text and extracting text from a PDF. If you start from a Word file, there are separate guides to converting DOCX to TXT and converting DOCX to PDF.


ClearConvert gives you a plain, readable A4 PDF of a text file without the file leaving your device. It is a good fit for Latin, Cyrillic and Greek text, code and long lists. It is the wrong tool for text in Chinese, Japanese, Korean or Hindi, or text with emoji, and it will not tell you when characters are missing.

Related posts

For questions or inquiries contact us at info@cleartexteditor.com