Prepare Documents for AI (PDF/Word to LLM-Ready Markdown)
One clean, token-counted context file from all your documents, ready for an AI chat.
Try before you buy.
- Free preview: every token count and file summary, and the first half of the context file’s words (up to 100), made from all your files.
- Locked until you unlock it: download and copy.
- Unlock: Pro pass, ₹179 for 30 days, a one-time payment that never renews.
Ways to unlock shows how to get the full result.
Printing this result is locked in the free preview.
Your files
OCR reads text in pictures of pages. It runs on your device and is slow on phones (a few seconds a page); English is always read as well.
Reading…
Context file
No AI runs on this page: your files are only read and tidied on your device.
Mask personal details before you paste
The same value always gets the same tag. Detection is a best effort: check the result before you share it.
Chunks for a retrieval index (JSONL)
Each chunk keeps its file, page range and heading, and is counted with the cl100k_base tokenizer.
Ready to paste
| Tokenizer | Tokens | Used by |
|---|
Locked in the free preview. Opens the ways to unlock this result.
Locked in the free preview. Batch runs unlock with a pass.
Locked in the free preview. Query results unlock with a pass.
About the Prepare Documents for AI (PDF/Word to LLM-Ready Markdown)
Add your PDFs, Word and PowerPoint files, spreadsheets, e-books, web pages, e-mails, Markdown, text and source code, and get one clean context file to paste into ChatGPT, Claude, Gemini or a local model — in Markdown, XML tags or plain text, with a marker for every file and page so the AI can cite where things are. Running headers, footers and lone page numbers are taken out, hyphenated words are joined, tables become Markdown tables, and code stays in fenced blocks exactly as written.
The page counts the tokens exactly for OpenAI’s o200k_base and cl100k_base tokenizers and gives labelled estimates for tokenizers that are not published, so you know whether it fits before you paste. For a retrieval index, it also cuts the documents into chunks with their file, page range and heading (JSON Lines). You can mask e-mail addresses, phone numbers, card and ID numbers and your own list of names first. No AI runs on this page and nothing is uploaded. Without a pass you get the free preview: every count and the first half of the context file’s words.
How to use it
- Choose your files (or drop them on the box): up to 50, mixed as you like. Each card shows what was read and any hidden text that was left out. For scans or photos, tick Read scanned pages and photos.
- Pick Markdown, XML tags or Plain text, and the markers and clean-up you want. The context file is rebuilt as you change them.
- Optionally open Mask personal details and add names or words of your own, and set the chunk size and overlap for a retrieval index.
- Check the token counts and the start of the file. With a pass, Copy it to paste into your AI chat, or download the context file, the chunks (.jsonl) or both in a ZIP; the free preview shows the counts and the first half of the file’s words.
Examples
agreement.pdf, annex-a.docx, rates.xlsx · Markdown
“# File 1: agreement.pdf” with “## Page 1” … headings, the rates as a Markdown table, and token counts such as o200k_base 18,412.
week-1.pptx … week-6.pptx · XML tags
<document index="1" source="week-1.pptx"> with a <part name="Slide 2: …"> tag per slide, speaker notes included.
README.md, app.py, models.py, schema.sql
The README as Markdown and each source file in a fenced block (```python … ```), with any hidden direction-override characters removed and reported.
Common uses
- Pasting several reports into an AI chat with page markers, so its answers can say where they come from.
- Building a retrieval (RAG) index: chunks with file, page and heading metadata.
- Checking how many tokens a set of documents takes before sending it to a model with a limited context window.
- Removing personal details from documents before sharing them with any AI service.
What the clean-up does, and doesn’t
- Leaves out what a reader can’t see. Invisible, tiny, white-on-white, off-page and hidden text is not copied (it can carry instructions meant to steer an AI), and each file’s card lists what was left out.
- Tidies, never rewrites. Running headers and footers of PDFs, lone page numbers and line-end hyphenation are removed and spaces collapsed; the words themselves are not changed, and source code is kept byte for byte apart from invisible and direction-override characters.
- Keeps structure. Headings, lists, tables (as Markdown tables), slide notes and the order of pages, slides, sheets and chapters.
Formats
- Markdown:
# File 1: name,## Page 3(or Slide, Sheet, Chapter), the document’s own headings below them, tables and fenced code. - XML tags:
<documents>with one<document index source type>per file and a<page number>or<part name>per unit, so it is clear where each file and page begins and ends. Text is escaped. - Plain text:
===== File 1 of 3: name =====and--- Page 3 ---markers. - Chunks (.jsonl): one JSON object per line —
id,file,unit,start,end,heading,tokensandtext.
Token counts
The counts for o200k_base and cl100k_base are exact: they use OpenAI’s published tokenizer data, through the open-source gpt-tokenizer library. Some models don’t publish their tokenizers; their figures are estimates from their makers’ own rules of thumb, and the table says so. For one model in detail, or to count a prompt with special tokens, use the LLM Token Counter.
Masking personal details
With masking on, e-mail addresses, phone numbers (with your country for numbers written without +), card numbers (Luhn-checked), IBANs, Indian Aadhaar, PAN, GSTIN and UPI IDs, US Social Security and UK National Insurance numbers, IP and MAC addresses, and the names or words you list, become numbered tags such as [EMAIL_1] — the same value always gets the same tag across all files. It uses the same detectors as the PII Redactor. Detection is a best effort: check the file before you share it.
Limitations
- Up to 50 files and 2,000 pages (or slides, sheets, chapters) at once; 100 MB per file and 300 MB in all. Very large sets are slow on phones.
- Tables in PDFs are read as lines of text (Word, Excel and HTML tables keep their cells). Text inside pictures is read only with OCR, which can misread names and numbers.
- Estimated token counts can be off by a tenth or more; only the two OpenAI encodings are exact.
- Masking finds common formats only: names it doesn’t know and unusual ID formats stay unless you list them.
- DRM-protected e-books and password-protected Office files can’t be read; protected PDFs open with their password.
Privacy
Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot. The file readers, the tokenizers (about 2 MB) and, when you turn on OCR, the recognition data for its language are downloaded from MySmartCoPilot the first time. Your files never leave your device, and no AI runs on this page.
Frequently asked questions
What do I get without a pass?
Without a pass, Prepare Documents for AI (PDF/Word to LLM-Ready Markdown) shows every token count and file summary, and the first half of the context file’s words (up to 100), made from all your files. Until you unlock it, the result can’t be downloaded or copied. A Pro, Premium or Ultimate pass, a one-time payment that never renews, unlocks the full result. The pricing page lists the passes and their prices.
Does any AI see my files here?
No. This page runs no AI and uploads nothing: the files are read and tidied in your browser. What you do with the context file afterwards — paste it into an AI chat, or keep it — is up to you.
Which format should I use?
Markdown is the easiest to read and works well in most AI chats. XML tags mark where each file and page begins and ends very clearly, which helps a model cite them in long contexts. Plain text suits tools that don’t read Markdown.
Why are some parts of my PDF missing?
Hidden text (invisible, tiny, white or off the page) is left out on purpose, and running headers, footers and page numbers are removed. The file’s card lists what was left out. Scanned pages need OCR: tick “Read scanned pages and photos”.
What chunk size should I pick for retrieval?
About 512 tokens with 10% overlap is a common starting point for search over documents; smaller chunks give more precise matches, larger ones keep more context together. Each chunk records its file, page range and heading, so answers can cite them.