Black Friday: 50% off every paid plan with code BF50. Ends 5 December.

See prices

Free tool

Text to PDF, neat pages from plain text.

Paste text or open one or more .txt files and get a clean PDF. Pick a regular or a typewriter-style font, the text size, line spacing and margins. Keep every line break as it is, for code, logs and poems, or join lines into paragraphs for text that was wrapped. Several files go into one PDF, each starting on a new page, or into a PDF each. Add a header and page numbers in the style you like.

Need a custom tool, app or website? Contact us 
Text
PDF

Text

Page

Press Ctrl or Cmd + S to download. Your settings are kept for next time.

Your text is turned into a PDF in your browser. It is never uploaded.

Which setting

Keep the lines or join them?

01 / Keep

Code, logs, poems

Every line stays a line, with its spaces and indents. Long lines wrap onto the next line.

02 / Join

Wrapped text

Text copied from email or a PDF breaks every line. Joining makes flowing paragraphs, split at blank lines.

03 / Mono

Columns line up

The typewriter font gives every letter the same width, so tables made of spaces stay straight.

Guide

How to convert text to PDF, with the layout you want.

To convert text to PDF is to lay plain text, typed or from a .txt file, out on pages with a font, size, spacing and margins, and save it as a PDF anyone can open. This tool keeps the text as real text you can select and search. You choose whether every line break stays as typed or lines are joined into paragraphs, and several text files can go into one PDF, each starting on a new page.

How to convert a TXT file to PDF

  1. Paste or type text into the box, or click Open .txt files. You can pick several files at once, or drop them onto the box.
  2. Under Font, pick Regular (Inter) for reading, or Typewriter (mono) for code, logs and text laid out with spaces.
  3. Set the Size and the Line spacing: Tight, Normal, Relaxed or Double.
  4. Under Lines, choose Keep as typed or Join into paragraphs. The section below explains which to pick.
  5. Pick the page Size and Margins, choose how Page numbers look (or None), and type a Header on every page if you want one.
  6. Check the preview, step through the pages with the arrows, then click Download PDF or press Ctrl or Cmd + S. Your settings are kept for next time.

Keep as typed or join into paragraphs

This one setting decides whether the PDF looks right. Look at your text and ask where its line breaks came from.

  • Keep as typed when each line break means something: code, server logs, a poem, a song sheet, a list of addresses, or subtitles. Spaces and indents stay as well. A line too long for the page wraps onto the next line.
  • Join into paragraphs when the line breaks are only there because the text was wrapped somewhere else. Text copied from an email, an old .txt export or a PDF often breaks every 70 or so characters. Joining turns each block into one flowing paragraph, and a blank line starts a new paragraph.

A quick test: if the preview shows short, ragged lines that end mid-sentence, switch to Join into paragraphs.

How many lines fit on a page

Line spacing is a multiple of the text size. At 11 pt with Normal spacing (1.45), each line takes 11 times 1.45, or about 16 points. An A4 page is 842 points tall, and Normal margins take 56 points off the top and the bottom, which leaves about 730 points for text. 730 divided by 16 is about 45 lines.

Line spacing at 11 ptSpace per lineLines on an A4 page, roughly
Tight (1.25)13.75 pt53
Normal (1.45)15.95 pt45
Relaxed (1.8)19.8 pt36
Double (2.2)24.2 pt30

These counts are for lines that fit across the page. Long lines that wrap take two or more. Pick Double when someone will mark up a printed draft between the lines, and Tight with 9 or 10 pt to fit a long log onto fewer pages.

Regular or typewriter font

The regular font, Inter, is easy to read for prose and notes. The typewriter font gives every letter the same width, so anything lined up with spaces stays lined up: a table typed with spaces, ASCII diagrams, or columns of numbers in a log. If your text has columns that look crooked in the preview, switch the font to Typewriter.

Several files in one PDF

Open or drop several text files together and each one starts on a new page of the same PDF, so you can bundle a folder of notes, meeting minutes or log files into one document. The PDF is named text-files.pdf; with one file it takes that file's name. To keep them apart, set Save as to A PDF for each file: each file becomes its own PDF, named after it, and they download together in text-pdfs.zip. If you type in the box after opening several files, they are joined into one text and the page breaks between them go away.

Page breaks, headers and page numbers

Some text files mark a new page with a form feed, an invisible character that old printers read as "start a new sheet". Program listings and reports saved from older systems often have them. A form feed starts a new page in the PDF too. Page numbers can read 1 / 12, Page 1 of 12 or just 1, at the centre or the right of the foot. A header is a short line at the top of every page, such as a title, a name or a date.

On a Mac

TextEdit can do a quick version. Open the .txt file in TextEdit and choose File > Export as PDF. It uses TextEdit's own font and margins, one file at a time. Use the tool above when you want to set the spacing, join wrapped lines or put several files in one PDF.

Want headings, bold text and lists? Write them in Markdown and use Markdown to PDF. To clean up wrapped text before you convert it, try remove line breaks. And to get text back out of a PDF, use PDF to text.

Questions

Good to know.

Can I select and search the text in the PDF?

Yes. The text is written as real text with embedded fonts, not as a picture.

Can I convert several .txt files at once?

Yes. Choose or drop them together and they become one PDF, each file starting on a new page, in the order the browser lists them. Or set Save as to A PDF for each file and get them all in one ZIP.

How do I start a new page?

A form feed character in the text starts a new page, as it does on a printer. Each file you add also starts on a new page.

Which languages work?

The regular font covers Latin, Greek and Cyrillic, and the typewriter font Latin and Cyrillic. Letters outside these, and emoji, show as "?", and the page tells you when that happens.

How do I add headings and bold text?

Plain text has no styles. Write # before a heading and **two stars** around bold words, then use Markdown to PDF.

Is there a size limit?

Text files up to 20 MB each. Very long files take longer: in our test, 15,000 lines made 556 pages in about 12 seconds.

Why does my PDF have short broken lines?

The text had a line break at the end of every line, which is common in copied email or old text files. Set Lines to Join into paragraphs and they flow into full paragraphs.

Can I convert a log or code file to PDF?

Yes. Open the file, pick Typewriter (mono) and Keep as typed, so indents and columns stay in line. Files ending in .log, .json, .xml, .csv and other text types open too.

Can I make a double spaced PDF from text?

Yes. Set Line spacing to Double. Pair it with Wide margins if the PDF will be printed for notes.

Does it keep tabs and extra spaces?

With Keep as typed, spaces and indents are kept, and a tab counts as four spaces. With Join into paragraphs, the breaks inside a paragraph become single spaces, so indents at the start of those lines go.

Can I use US Letter instead of A4?

Yes. The page size can be A4, US Letter, US Legal or A5, and the margins can be Narrow, Normal or Wide.

What if my text is Chinese, Hindi or Arabic?

The PDF fonts do not have those letters, so they show as question marks and the page says so. Use Save with all alphabets instead: it opens your browser's print window, which draws the text with the fonts on your computer, and you choose Save as PDF there.

Listed on

Listed on JustMacAppsMotionShine on Mac App IndexMotionShine on ScrollLaunchMotionShine featured on StartupBaseFeatured on FazierFeatured on Twelve ToolsMotionShine - Featured on Smol Launch