Text to PDF
Plain Text and Markdown to PDF

Free online text and Markdown to PDF converter. Paste, type, or drop a file, customize formatting (page numbers, headers, footers, watermark, title page, table of contents), preview live, then download. 100% client-side processing - your text never leaves your browser.

Text to PDF illustration

Text to PDF Converter Tool

0 characters, 0 words, 0 lines

Ctrl/Cmd + Enter to convert

PDF Options

Page Layout
Custom margins (pt, leave blank to use preset)
Typography
8pt24pt
Header, Footer & Watermark
Title Page & Table of Contents
PDF Metadata (optional)

Defaults to RJL.io. Last value is remembered for next time.

Non-editable PDF metadata (always set):

Creator
RJL.io PDF Tools (https://rjl.io)
Producer
RJL.io PDF Tools © 2026 (https://rjl.io)
Keywords
Always includes RJL.io

.pdf extension will be added automatically

Enter text to get started

Privacy First: All processing happens in your browser. Your text is never uploaded to any server. Drafts auto-save to your browser's local storage (not the cloud).

Common Use Cases

Documents & Reports

Convert notes, reports, or drafts into professional PDFs - with page numbers, headers/footers, watermarks, and an optional title page.

Code Snippets

Paste Markdown with fenced code blocks. Get syntax-highlighted output with optional line numbers - great for code reviews and docs.

Creative Writing

Manuscripts and stories with **bold**, *italic*, headings, and a generated table of contents from your Markdown headings.

Formatting Options

Page Sizes

A3, A4, A5, Letter, Legal, Tabloid, Half Letter

Markdown

Headings, bold, italic, code, lists, quotes

Typography

8-24pt, color, alignment, line spacing

Chrome

Page numbers, header/footer, watermark, TOC

How Text Becomes a PDF

Five-step pipeline: your text or .md file, parse Markdown, wrap and paginate, draw with pdf-lib, download PDF, all inside your browser
Every step runs in your browser tab. No file is sent to a server.

How it works

  1. Input. Type, paste, or drop one or more .txt or .md files. In Plain Text mode every line is kept as you wrote it.
  2. Parse. In Markdown mode the text is parsed into headings, paragraphs, lists, quotes and code blocks.
  3. Wrap and paginate. Lines are measured with the chosen font and size, wrapped to the text area, and split across pages using your line spacing and margins.
  4. Draw. The pdf-lib library places each line on a page, then adds page numbers, header, footer, watermark and the standard document metadata.
  5. Download. The finished file is built in memory and saved from your browser. Use Preview first to check the page breaks.

The PDF uses the three built-in PDF fonts (Helvetica, Times Roman, Courier). They are always available in any PDF viewer, which keeps files small, but they only cover Western European characters. Symbols such as arrows and check marks are swapped for plain ASCII look-alikes (for example ->) so the conversion never fails.

Page size and margins

PDF measures everything in points: 72 points equal one inch. A page is a fixed rectangle, the margins are blank bands on each side, and the text area is what remains. A bigger margin or font means fewer lines per page and more pages.

Page sizes in points and millimeters or inches
SizeDimensionsPoints (portrait)
US Letter8.5 x 11 in612 x 792
US Legal8.5 x 14 in612 x 1008
Tabloid11 x 17 in792 x 1224
Half Letter5.5 x 8.5 in396 x 612
A3297 x 420 mm841.89 x 1190.55
A4210 x 297 mm595.28 x 841.89
A5148 x 210 mm419.53 x 595.28

Margin presets: Narrow is 36 pt (0.5 in), Normal is 54 pt (0.75 in), Wide is 72 pt (1 in). Open Custom margins to set top, right, bottom and left separately. Landscape swaps width and height.

A page diagram labeling the text area, the four margins, the header, the page number, and the Letter and A4 sizes in points
Anatomy of a page: margins surround the text area, with the header and page number inside the margin band.

What Markdown mode renders

Switch Render Mode to Markdown and the page turns familiar syntax into formatted PDF text. A .md file switches the mode for you.

Markdown syntax and how it appears in the PDF
You typePDF result
# Title to #### SmallHeadings H1 to H4, largest first
**bold** and *italic*Bold and italic text
`code`Monospace inline code
Fenced block with a language nameSyntax-highlighted code block
- item or 1. itemBulleted or numbered list
> quoteBlock quote
---Horizontal rule
[text](https://example.com)Link
Download the Markdown Viewer cheat sheet (PDF) One printable page of Markdown syntax. Preview any document first in the Markdown Viewer.

Common problems and fixes

Common conversion problems and how to fix them
ProblemCauseFix
The PDF shows # and ** literallyRender Mode is Plain TextSwitch Render Mode to Markdown
An arrow or check mark became -> or vBuilt-in PDF fonts cover Western European characters onlyExpected: it is replaced with an ASCII look-alike. Emoji and non-Latin scripts are not supported
Lines wrap differently from the editorWrapping follows the page width, margins and font sizeUse a Narrow margin, a smaller font, or Landscape
Too many pagesLarge font, double spacing or wide marginsTry 11 pt, 1.15 spacing and a Narrow margin
Printed page is cut off or scaledPage size does not match the paper (Letter vs A4)Pick the size you will print on

Frequently Asked Questions

Why We Built This Tool

Converting text to PDF is often needed for sharing notes, archiving documents, or creating printable versions of plain text and Markdown files. Many online converters require uploading your content to their servers, which isn't ideal for sensitive information.

Our tool processes everything in your browser using the pdf-lib library, marked Markdown parser, and highlight.js syntax highlighter. Your text never leaves your device, making it safe to convert confidential content. Plus, it works offline once the page is loaded.

Is your site ready for Google and AI search?

The free SEO Analyzer checks any page in seconds - meta tags, structured data, AI crawler access - and tells you exactly how to fix each issue on your platform.