# Document to Markdown Converter > Free in-browser converter that turns PDF, Word (.docx), HTML, TXT and Markdown files, or pasted rich text, into clean Markdown for LLMs such as ChatGPT and Claude. Files are never uploaded: conversion runs in the browser tab. - [Document to Markdown Converter](https://lab.awaara.cn/document-to-markdown/): drop a PDF, DOCX, HTML, TXT or MD file, or paste rich text or HTML, and get Markdown with headings, lists, links and GFM tables. Strips repeated PDF headers, footers and page numbers, and shows word, character and estimated token counts. Copy or download as .md. ## Features - PDF: text extracted with pdf.js; headings guessed from font size (up to 3 levels), paragraphs rebuilt from line spacing, bullet and numbered lists detected, words hyphenated at line ends joined, paragraphs split across pages joined - PDF clean-up (option, on by default): removes page numbers and header or footer lines that repeat on at least half the pages (3 pages minimum), looking only at the top and bottom 10 percent of each page - Word .docx: converted with mammoth; Heading styles become #, ##, ###; Title becomes #; lists, bold, italic, links, tables and footnotes come through - HTML files and pasted rich text: converted with Turndown and the GFM plugin; scripts, styles, forms and frames removed; tables become GFM tables with the first row as the header; code blocks keep their language; Google Docs pastes keep bold and italic - Options: remove images (on by default), keep links (on by default), PDF header, footer and page number removal (on by default); changing an option converts the same input again - Images: removed by default; when kept, images with a web address stay as ![alt](url) and embedded images become [Image: alt text] - Output: editable Markdown box, word count, character count, token estimate (characters / 4), Copy and Download .md - Load sample: a short HTML release note with headings, lists, a code block and a table ## Limits - File size limit 30 MB; PDFs convert the first 300 pages and say so when there are more - Scanned PDFs with no text layer: "No text layer, this looks scanned. OCR isn't supported." Pages without text inside a mixed PDF are skipped and counted - Password-protected PDFs and .docx files can't be read; old .doc files must be saved as .docx first - PDF tables come out as plain lines; multi-column PDFs follow the PDF's internal text order; headings set in bold at body size aren't detected - Merged table cells are split into empty cells; a line break inside a cell becomes a space - The token count is an estimate (characters / 4), lower than real counts for code and for Chinese, Japanese and Korean text ## Privacy - Files are read with the browser's File API and converted in the tab; nothing is uploaded - Umami counts conversions with the file type (pdf, docx, html, paste, txt) and result (ok, scanned, error, too-big) only; no file names or content ## Use it - Web: https://lab.awaara.cn/document-to-markdown/ - Drop a file on the box or press Choose file. Or paste into the paste box: rich text converts on paste; typed HTML or text converts with the Convert button. ## Libraries - pdf.js 6.5.438 (Apache-2.0), mammoth 1.13.0 (BSD-2-Clause), Turndown 7.2.5 (MIT), turndown-plugin-gfm 1.0.2 (MIT), all served from lab.awaara.cn