Home / Guides

How to convert text to a PDF

By PDF Cactus · Updated 29 October 2026

Sometimes you just need a tidy PDF from a piece of text: notes, a letter, a poem, an email or a document you need to send as a PDF. You can do it in your browser, and nothing is uploaded.

Step by step

  1. Open the Text to PDF tool.
  2. Paste your text into the box, or choose a .txt, .md or .docx file to load it.
  3. Choose the page size (A4 or US Letter), font, text size, line spacing and margins.
  4. Add a title and page numbers if you want them.
  5. Select Create PDF, check the preview, and download.

Headings and lists

Start a line with # for a large heading or ## for a smaller one. Start a line with - or * for a bullet. Numbered lines like 1. and 2. become an indented list.

Fixing text with broken lines

Text copied from an email or another PDF often has a line break at the end of every line. Tick Join lines into paragraphs so each paragraph flows across the page. Blank lines still start a new paragraph.

Which page size?

Use A4 in most of the world, including Pakistan, the UK, Australia and the UAE. Use US Letter in the USA, Canada and Mexico. See also the guide to images to PDF if your document is a set of pictures.

Urdu, Arabic and other scripts

Choose Naskh or Nastaliq, or paste Urdu or Arabic text and the font is picked for you. Lines read right to left and the letters join correctly. Because your browser draws these letters, the pages are saved as sharp pictures, so that text cannot be selected or searched. English and other Western European text stays as real, selectable text. For more detail, read how to add Urdu or Arabic text to a PDF.

Going the other way

To turn a PDF back into an editable file, use PDF to Word.

Open the Text to PDF tool

More guides