Transform PDFs, DOCX files, and raw documents into clean, LLM-optimized Markdown & Claude XML directly inside your browser — with zero server uploads, 100% privacy, and real-time GPT-4 token count analytics.
When feeding documents to Large Language Models (LLMs) like GPT-4, Claude 3.5 Sonnet, or Gemini, raw PDFs and Word files waste vast portions of your context window on repeated headers, footers, visual layout noise, and page numbers. Existing converters often upload private documents to remote cloud servers for extraction.
NatyMD solves this with a privacy-first, client-side document compiler:
- Parses & Cleans Documents Locally: Strips layout clutter, converting PDFs, Word (
.docx), plain text, Markdown, and CSV files into minimal Markdown. - Real-Time GPT Token Savings: Live calculation of original vs. cleaned token counts using OpenAI
tiktoken/cl100k_baseBPE tokenizer. - 100% Zero-Server Storage: All computation runs in browser memory using WebAssembly and Web Workers. Your data never touches a server.
- 📑 Multi-Format Document Parsing:
- PDF Documents: Direct vector text extraction via Mozilla PDF.js.
- Microsoft Word (
.docx): XML DOM parser converting paragraphs, headings, tables, bullet points, and formatting to Markdown. - Plain Text / Data: Native handling of
.txt,.md, and.csvfiles.
- ⚡ Live Editable Output Pane:
- Tweak, edit, or clean up generated Markdown in a full-height, dark-themed monospace editor.
- Instant live recalculation of token counts and context optimization as you type or delete text.
- 📊 Real-Time Token Counting & Impact Banner:
- Live OpenAI Tiktoken BPE (
cl100k_base) calculation. - Context Optimization metric displaying exact tokens saved and percentage reduction.
- Live OpenAI Tiktoken BPE (
- 🏷️ Output Format Presets & Export:
- Standard Markdown: Clean, minimal Markdown ready to paste into LLM prompts.
- Claude XML: One-click formatting wrapping output in
<documents><document>...</document></documents>for optimal Claude prompt structure. - 1-Click Clipboard Copy & File Download: Export compiled content instantly with user toast feedback.
- 👁️ Client-Side WASM OCR:
- Automatic detection of scanned image-only PDF pages.
- Transparent optical character recognition using Tesseract WASM directly in Web Workers.
- Framework: React 19 + Vite + TanStack Router
- Language: TypeScript
- Token Analytics: OpenAI
tiktoken(cl100k_base) - PDF Engine: Mozilla PDF.js
- OCR Engine: Tesseract.js (WebAssembly)
- Styling: Tailwind CSS + Shadcn UI + Lucide Icons
# Clone the repository
git clone https://github.com/Natnael-Dev/NatyMD-web.git
# Navigate to project directory
cd NatyMD-web
# Install dependencies (using Bun or npm)
bun install
# Start development server
bun devDistributed under the MIT License.