Online Text to PDF Converter

txt → pdf

Turn pasted text or an uploaded .txt file into a paginated PDF on A4 pages. Your browser builds the PDF in this tab, so the text is never uploaded.

WorkspaceNothing is uploaded
Or upload a .txt file
Generating PDF…

About this text to PDF converter

Type or paste text into the box, drop a .txt file on the upload area, or load one with the Select .txt file button, then click Generate PDF document. The tool wraps your lines to fit A4 pages with a 50pt margin, starts new pages automatically, and sets Latin text in Helvetica at 12pt.

Text in another script is set in Noto Sans, which is fetched and embedded in the file when your text needs it, so Devanagari, Chinese, Cyrillic and Greek stay selectable and searchable rather than turning into question marks. Curly quotes, dashes, bullets and ellipses are kept as you wrote them. A script with no font here, such as Arabic, Hebrew, Thai or Korean, still comes out as question marks, and the page tells you when that happened.

How to use it

01

Add your text

Type or paste text into the box, or select a .txt file to load its content there.

02

Generate the PDF

Click Generate PDF document. Longer text is paginated across as many A4 pages as it needs.

03

Download the PDF

When the PDF is built, it appears with a Download button. Your browser saves it only after you click.

What it does

  • Builds a standard A4 PDF from typed, pasted or uploaded plain text, with automatic line wrapping and page breaks.
  • Sets Latin text in Helvetica at a fixed 12pt, with a 50pt margin on every page.
  • Embeds a Noto Sans font when the text needs one, so Devanagari, Chinese, Cyrillic and Greek come out as real text.
  • Loads the content of an uploaded .txt file straight into the text box, ready to edit before converting.
  • Has no fixed size limit; a very long text just produces a PDF with more pages.

Specifications

Specification Details
Input Typed or pasted text, or an uploaded .txt file
Page size A4 (595 × 842 pt) with a 50pt margin, more pages added automatically
Font Helvetica for Latin text, Noto Sans for other scripts, 12pt, dark grey
Character support Latin-1, plus Devanagari, Chinese, Cyrillic and Greek through an embedded font
Output file name converted_document.pdf
Library pdf-lib 1.17.1 from cdnjs; text in another script is built with @cantoo/pdf-lib and @cantoo/fontkit from jsDelivr
Good to know

What this converter does not do

It lays out plain text on A4 pages. A few things fall outside that.

Not every script has a font

Latin-1, Devanagari, Chinese, Cyrillic and Greek are covered. Arabic, Hebrew, Thai, Korean and emoji are not, so they come out as question marks and a warning says so.

No formatting

There's no bold, italics, headings, or a choice of font or page size. It's plain text on a plain page.

No page or file name control

The file always saves as converted_document.pdf, and pagination is automatic; you can't set a different page size or file name before converting.

A .docx keeps its formatting instead

For a Word document with headings, styles or images, DOCX to PDF converts it while keeping that layout, rather than flattening it to plain text.

Related tools

Frequently asked questions

No. The PDF is built inside this tab. The only things downloaded are the pdf-lib library from cdnjs and, when your text is not Latin, a font from jsDelivr. Your text never leaves the browser.

Yes. The matching Noto Sans font is fetched and embedded in the PDF when your text needs it, so Devanagari, Chinese, Cyrillic and Greek stay selectable. The Chinese font is around 8 MB, so the first conversion containing Chinese takes a moment. Arabic, Hebrew, Thai and Korean have no font here and come out as question marks.

Yes. Drop a .txt file on the box, or use the Select .txt file button. Either way its content lands in the text box, ready to edit before you convert.

No. Every PDF uses 12pt text on A4 pages with a 50pt margin.

Because no font here covers them. Latin-1, Devanagari, Chinese, Cyrillic and Greek are covered; Arabic, Hebrew, Thai, Korean and emoji are not. A warning appears when it happens, so you know before you send the file on.

No fixed limit. A very long text simply produces a PDF with more pages, bounded only by your browser's memory.

Your text stays on your device

The PDF is assembled in this tab with the pdf-lib library. Nothing you type or upload is sent anywhere. Only pdf-lib itself is downloaded, from cdnjs, the first time you use the tool.