Home › PDF Tools › Text to PDF Converter

Text to PDF Converter

Paste text or open a .txt file, pick a font, size, margins and paper, and get a neatly paginated PDF. The preview shows exactly how each page will look.

Last updated:

.pdf
Pages–
Lines / page–
Page 1 of 1
Advertisement
Advertisement

How to use the Text to PDF Converter

  1. Paste your text into the box or click Open .txt to load a file.
  2. Choose the font, size and line spacing, then the page size, orientation and margins.
  3. Optionally add a title and page numbers.
  4. Check the preview; use the arrows to flip through the pages.
  5. Press Download PDF to save the file.

Lines per page: the formula

The number of lines that fit on a page depends on the usable height and the line pitch:

lines per page = ⌊(page height − top margin − bottom margin) ÷ (font size × line spacing)⌋

Worked example: A4 is 841.89 pt tall. With 20 mm margins (20 × 72 ÷ 25.4 = 56.69 pt each) the usable height is 728.5 pt. At 12 pt and 1.5 spacing each line takes 18 pt, so 728.5 ÷ 18 = 40.5, which rounds down to 40 lines. A 100-line text therefore needs 3 pages (40 + 40 + 20).

Paper, 20 mm margins11 pt, single12 pt, 1.1512 pt, 1.512 pt, double
A4 (841.89 pt)66524030
US Letter (792 pt)61493728
Legal (1008 pt)81644937
A5 (595.28 pt)43342620

Paper sizes and units

PaperMillimetersInchesPoints
A4210 × 2978.27 × 11.69595 × 842
US Letter215.9 × 279.48.5 × 11612 × 792
Legal215.9 × 355.68.5 × 14612 × 1008
A5148 × 2105.83 × 8.27420 × 595
A3297 × 42011.69 × 16.54842 × 1191

PDF measures everything in points: 1 inch = 72 pt and 1 mm = 2.835 pt. A one-inch margin is 72 pt, the same as 25.4 mm.

Tips for good-looking text PDFs

  • Code, logs and tables: use Courier so every character has the same width and columns stay aligned. Turn on line numbers to make it easy to refer to a line.
  • Essays and letters: Times at 12 pt with 1.5 or double spacing is the usual school and office standard.
  • Reading on a phone: A5 portrait with 12 mm margins and 11 pt Helvetica gives short, comfortable lines.
  • Wide text: switch to landscape when your lines are long, for example CSV exports or spreadsheets pasted as text.

Frequently asked questions

Is my text uploaded anywhere?

No. The PDF is created by jsPDF directly in your browser, so your text and files never leave your device.

Which font should I choose?

Helvetica is a clean sans-serif for notes and letters, Times is a classic serif for essays and long reading, and Courier is monospace, so it keeps columns lined up in code, logs and plain-text tables.

Why are some characters shown as a warning?

The three built-in PDF fonts only cover Western European (Latin-1) characters. Letters such as Cyrillic, Greek, Chinese or emoji cannot be drawn with them, so the tool lists them before you download. They are replaced with a question mark in the PDF.

Will the line breaks in my text be kept?

Yes. Every line break and blank line is kept. Long lines are wrapped at word boundaries to fit the margins, and a very long word without spaces is split where it reaches the edge. Tabs become four spaces.

How many lines fit on a page?

Lines per page = usable height ÷ (font size × line spacing). On A4 with 20 mm margins and 12 pt text at 1.5 spacing, that is 728.5 ÷ 18 = 40 lines. The preview always shows the exact page count.

Can I convert a big text file?

Yes. Files with tens of thousands of lines work; the preview shows one page at a time so it stays fast.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Word to PDFConvert Word DOCX documents to PDF.Image to PDFConvert JPG, PNG, WEBP and more into a PDF.Merge PDFCombine several PDF files into one document.Add Page Numbers to PDFNumber PDF pages with your choice of position, format and font.Add Header and Footer to PDFAdd header and footer text with page numbers, date and file name to every PDF page.Chord Chart MakerTurn lyrics with chords into clean printable chord sheets; transpose, add chord diagrams, export PDF.DOCX to Text ConverterExtract plain text from Word .docx files, in batch, with list markers, tables and .txt download.Focus Reading ConverterBold the first letters of every word for faster, focused reading. Copy as rich text or HTML.JPG to PDFCombine JPG photos into one PDF with page size, margins and orientation options.PowerPoint to PDFConvert PPTX slides to PDF, one page per slide at the original slide size. Batch files, no upload.OCR PDFMake scanned PDFs searchable and copyable with OCR in 70+ languages, or export the text.PDF to WordConvert PDF files to editable Word documents.PDF to ExcelExtract tables from PDF files into an Excel spreadsheet (XLSX) or CSV, right in your browser.PDF to JPGTurn PDF pages into high-quality JPG images.PDF to PNGConvert PDF pages to PNG images with custom DPI and transparent background.PDF to Text ConverterExtract the text from any PDF page by page, then copy it or save it as a TXT file.HTML to PDF ConverterPaste HTML and CSS, preview it as pages and download a PDF, safely in your browser.Markdown to PDF ConverterWrite or paste Markdown, preview it with a clean theme and export a polished PDF in seconds.Excel to PDF ConverterConvert Excel and CSV sheets into tidy, paginated PDF tables with repeated headers.Extract Images from PDFPull every embedded photo and graphic out of a PDF as PNG or JPG, or save pages as images.PDF to PowerPointTurn every PDF page into a PowerPoint slide (PPTX) in 16:9, 4:3 or the PDF's own size.PDF to MarkdownConvert PDF to clean Markdown with headings, lists, tables, bold, italics and links.PDF to HTMLConvert PDF to a clean, responsive HTML page or an exact positioned layout, in your browser.PDF to Long ImageStitch all PDF pages into one tall PNG or JPG image, with gap, width and page range options.PNG to PDFConvert PNG images to one PDF, keeping transparency or filling it with white or any color.HEIC to PDFConvert iPhone HEIC photos into one PDF in your browser, with page size, margins and reordering.CSV to PDFTurn a CSV file into a clean, paginated PDF table with repeating headers.EPUB to PDF ConverterConvert EPUB e-books to PDF with images, page size, font size, margins and clickable bookmarks.PDF to TIFF ConverterConvert PDF pages to multi-page or single-page TIFF in color, grayscale or black and white.RTF to PDF ConverterConvert RTF documents to PDF with fonts, tables, images and page size options.SVG to PDF ConverterConvert SVG files to vector PDF with page size and fit options, or merge many SVGs into one PDF.TIFF to PDF ConverterConvert single and multi-page TIFF scans to PDF with page size and compression options.WEBP to PDF ConverterConvert one or many WEBP images to a PDF with page size, margins, layout and reordering.Add Image to PDFPlace a logo, photo or signature image on any PDF page. Drag, resize, rotate and set opacity.Compress PDF to 100KBShrink a PDF to 100KB or less automatically, keeping every page and page size.HTML to Word ConverterConvert HTML code or pasted rich text into an editable Word .docx document.Image to Word ConverterTurn JPG, PNG or screenshot text into an editable Word (.docx) document with OCR, in your browser.PDF ConverterConvert Word, Excel, PowerPoint, images, text, HTML or EPUB to PDF, and PDF to JPG, PNG, Word or text.EPS to PDFConvert EPS and PostScript files to vector PDF in your browser, cropped to the artwork.PDF to CSVExtract tables from a PDF to CSV files, with draggable column lines to fix the columns.PDF to SVGConvert PDF pages to scalable SVG vector files, with text kept as text or as paths.PDF to WEBPConvert PDF pages to small, sharp WEBP images with a DPI choice and a quality slider.PDF to EPUBConvert PDF to a reflowable EPUB e-book with chapters, headings, images and a table of contents.Scanned PDF to Word (OCR)OCR scanned PDFs or page photos into an editable Word document with rebuilt paragraphs.Word to JPGTurn every page of a Word .docx document into a JPG image, free and in your browser.Cursive Writing WorksheetMake cursive tracing worksheets from any text: joined letters, dotted and faded rows. PDF.EPUB MakerWrite or import chapters, add title, author and cover, and export a valid EPUB 3 e-book.Images to PowerPointTurn photos into a PowerPoint .pptx deck, one image per slide, with captions and 16:9 or 4:3.LaTeX to PDFCompile LaTeX to PDF in your browser with a TeX engine, live preview, log and PDF download.Merge Word DocumentsCombine several .docx files in any order into one Word document, with page or section breaks.PDF to FlipbookTurn a PDF into a page-turning flipbook with zoom and fullscreen, and export it as an HTML ZIP.PowerPoint ViewerOpen and present .pptx files in your browser with thumbnails, speaker notes and full screen.Whiteboard Photo to PDFClean up whiteboard and blackboard photos: straighten, remove glare, whiten, then save as PDF.DjVu to PDFConvert DjVu scans and books to PDF, with resolution, compression and page range options.EML to PDFConvert .eml emails to PDF with sender, recipients, date, formatted body, images and attachments.MOBI to PDFConvert DRM-free MOBI, AZW and AZW3 e-books to PDF with chapters, images and page size options.MSG to PDFConvert Outlook .msg emails to PDF with headers, formatted body, images and attachment list.ODT to PDFConvert OpenDocument Text (.odt) files to PDF with headings, lists, tables and images.
See all 53 PDF Converters →