How to convert text, Markdown or HTML to PDF

Notes, README files, exported web pages and plain text files are easy to write and awkward to share. A PDF looks the same for everyone. This guide shows how to turn text, Markdown and HTML into a clean PDF in your browser, and what each format keeps.

3 min read · 699 words · Updated 12 November 2026

Text to PDF
Text to PDF
Turn plain text into a PDF.
Open the tool

Three tools, one idea

The three tools work alike: you give them text, they lay it out on pages. Text to PDF takes plain text exactly as written. Markdown to PDF understands Markdown formatting, so headings, bold, lists, links, quotes and code blocks look right. HTML to PDF understands the structure of a web page and turns headings, paragraphs, lists and tables into formatted pages.

Each one lets you either drop a file or type and paste straight into the box, with a live preview.

  • Text to PDF: notes, logs, letters, scripts.
  • Markdown to PDF: README files, documentation, articles written in Markdown.
  • HTML to PDF: saved or hand-written HTML, email templates, simple pages.

How to convert, step by step

Choose the tool that matches your format. Everything is done in your browser and nothing is uploaded.

  • Drop a .txt, .md or .html file into the box, or type or paste text into the text area.
  • Look at the preview. It shows how the pages will look.
  • Set the page size (A4 or US Letter), the orientation, the font size and the margin.
  • Click Create PDF and download the file.

What Markdown and HTML keep

Markdown becomes a styled document: headings in larger type, bold and italic, bulleted and numbered lists, quotes, code in a monospaced font and links. HTML is read the way a browser reads the structure: headings, paragraphs, lists and tables are turned into formatted text. Scripts, styles, frames and other active content are ignored.

This is a layout from the structure, not a screenshot of a web page. Complex page designs with columns, buttons, background images and custom fonts will not look like the original. For a faithful copy of a web page, the browser’s own Print to PDF is better. These tools are for documents whose content matters more than their decoration.

Fonts and other alphabets

Text in the Latin alphabet becomes real, selectable PDF text, which can be searched and copied and keeps the file small. Arabic, Urdu, Chinese and other scripts are drawn with your browser’s fonts, read in the right direction and look correct, but that text is a picture inside the PDF, so it cannot be selected. If you need searchable text, run OCR PDF afterwards.

Page layout

A4 and US Letter are available, in portrait or landscape. The margin can be none, small or large, and the font size ranges from 10 to 20 points. 12 points with a small margin is a good default for letters and notes. Smaller type fits more on a page and suits logs and code, larger type suits reading on a screen.

Long lines wrap to the page width, and pages break automatically. Code and monospaced text keep their spacing.

What to do next

Add numbers with Add Page Numbers, a title and date with Header and Footer, or protect the file with Protect PDF. To combine several documents, use Merge PDF. To go the other way and get text, Markdown or HTML out of a PDF, see PDF to Text.

Privacy

Your text is turned into a PDF on your device. Nothing is uploaded or stored, which is useful for private notes, drafts and code.

Questions

What is the difference between the three tools?

Text keeps plain text as is. Markdown understands Markdown formatting. HTML understands the structure of a web page.

Will an HTML page look like in a browser?

No. Headings, paragraphs, lists and tables are kept, but complex designs are not. Use the browser’s Print to PDF for an exact copy.

Can I paste text instead of uploading a file?

Yes. Type or paste into the text area.

Does it work with Arabic or Chinese?

Yes. Those scripts are drawn with your browser’s fonts, but the text is then not selectable.

Can I choose A4 or Letter?

Yes, in portrait or landscape.

Is my text uploaded?

No. It is converted in your browser.

More guides