GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Andikaputh/doc2md-converter: A privacy-first document-to-markdown converter optimized for LLM workflows. Securely extract and batch-process PDFs, Office files, and more in-memory.

BranchesTags
Open more actions menu

Latest commit

 

History

41 Commits
41 Commits

Folders and files

NameName
Last commit message
Last commit date
backend
backend
 
 
frontend-react
frontend-react
 
 
README.md
README.md
 
 
start-backend.bat
start-backend.bat
 
 

Repository files navigation

MarkItDown Web Converter

A clean, full-stack web application that converts various document formats such as PDF, DOCX, PPTX, XLSX, and more into clean, structured Markdown.

Built specifically to prepare documents for LLM (Large Language Model) ingestion, making it easier to extract, clean, and reuse document content in AI-powered workflows.

Powered by Microsoft MarkItDown, FastAPI, and React + Vite.

Created by @Andikaputh.


🌐 Live Demo

The application has been deployed and is publicly accessible.

Try it here:

šŸ‘‰ https://doc2md-nu.vercel.app/

No local installation is required to try the deployed version. Simply open the link, upload a supported document, and convert it into Markdown.


✨ Features

  • Convert various document formats into Markdown
  • Support for PDF, DOCX, PPTX, XLSX, and other formats supported by MarkItDown
  • Clean and structured Markdown output
  • Fast asynchronous file processing
  • Copy converted Markdown directly to clipboard
  • Temporary file management on the backend
  • RESTful API built with FastAPI
  • Modern frontend built with React and Vite
  • Simple and clean user interface
  • Publicly accessible web application

šŸ—ļø Architecture

The application consists of two main components:

Backend

Built with:

  • Python
  • FastAPI
  • Microsoft MarkItDown
  • Uvicorn

The backend is responsible for:

  • Receiving uploaded documents
  • Processing files using MarkItDown
  • Converting documents into Markdown
  • Managing temporary files
  • Providing the conversion API

Frontend

Built with:

  • React
  • Vite
  • JavaScript
  • CSS

The frontend is responsible for:

  • File uploading
  • Communicating with the backend API
  • Displaying converted Markdown
  • Managing application state
  • Copying Markdown output to the clipboard

Project Structure

MarkItDown-Web-Converter/
ā”œā”€ā”€ backend/
│   └── main.py
│
ā”œā”€ā”€ frontend-react/
│   ā”œā”€ā”€ src/
│   ā”œā”€ā”€ public/
│   ā”œā”€ā”€ package.json
│   └── vite.config.js
│
└── README.md

šŸš€ Getting Started

Follow the steps below to run the project locally.

Prerequisites

Make sure the following are installed on your machine:

  • Python 3.10+
  • Node.js 18+
  • npm
  • Git

1. Start the Backend

Open a terminal and navigate to the backend directory:

cd backend

Install the required Python packages:

pip install fastapi uvicorn markitdown[all] python-multipart

Start the FastAPI development server:

python -m uvicorn main:app --reload

The backend API will be available at:

http://localhost:8000

You can also access the FastAPI interactive API documentation at:

http://localhost:8000/docs

2. Start the Frontend

Open a new terminal and navigate to the React frontend directory:

cd frontend-react

Install the required dependencies:

npm install

Start the Vite development server:

npm run dev

The web application will be available at:

http://localhost:5173

šŸ”— API Reference

POST /api/convert

Converts an uploaded document into a Markdown string.

Request

The endpoint expects a multipart/form-data request containing a file field.

Field:

file

Example Response

{
  "success": true,
  "filename": "document.pdf",
  "markdown_content": "# Parsed Text..."
}

Response Fields

Field Type Description
success boolean Indicates whether the conversion was successful
filename string Original uploaded filename
markdown_content string Converted Markdown content

šŸ”„ How It Works

The conversion process follows this flow:

User uploads document
        ↓
React Frontend
        ↓
POST /api/convert
        ↓
FastAPI Backend
        ↓
Microsoft MarkItDown
        ↓
Markdown Conversion
        ↓
JSON Response
        ↓
React Frontend
        ↓
Display Markdown Output

šŸ“„ Supported Documents

The application supports document formats handled by Microsoft MarkItDown.

Common examples include:

  • PDF
  • Microsoft Word (.docx)
  • Microsoft PowerPoint (.pptx)
  • Microsoft Excel (.xlsx)
  • CSV
  • HTML
  • XML
  • Text files
  • Other formats supported by MarkItDown

Supported formats may depend on the installed MarkItDown dependencies and version.


šŸ› ļø Technologies

Layer Technology
Frontend React
Build Tool Vite
Backend FastAPI
Programming Language Python
Document Conversion Microsoft MarkItDown
API Server Uvicorn
Package Manager npm / pip

šŸ“Œ Use Cases

This project is particularly useful for preparing documents for AI and LLM workflows.

Examples include:

  • Converting research papers into Markdown
  • Preparing documents for LLM ingestion
  • Extracting structured content from office documents
  • Creating Markdown datasets
  • Preparing documents for Retrieval-Augmented Generation (RAG)
  • Cleaning document content before AI processing
  • Converting business documents into machine-readable text

šŸŒ Deployment

The application has been deployed as a publicly accessible web application.

Frontend

The frontend is hosted and available at:

https://doc2md-nu.vercel.app/

Users can access the application directly from a web browser without installing the project locally.

Local Development

For development purposes, the frontend and backend can still be run locally using the instructions provided in the Getting Started section.

Backend URL configuration (important)

The frontend talks to FastAPI through VITE_API_BASE_URL:

  • Local development (npm run dev) — leave the variable empty. Vite proxies /api/* to http://localhost:8000 (see frontend-react/vite.config.js).
  • Production (Vercel, Netlify, ...) — frontend-react/.env.production already points to the deployed Render backend: https://doc2md-api-d1ox.onrender.com. Vite embeds this value at build time, so the public site no longer depends on localhost.

You can also override it in Vercel → Project → Settings → Environment Variables (VITE_API_BASE_URL); environment variables take precedence over .env.production. Redeploy after changing it.

Keeping the free Render backend awake

Render's free instance sleeps after ~15 minutes without traffic, so the first request can take 30–60 seconds. Two options:

  • Free: create a monitor at cron-job.org (or UptimeRobot) that calls https://doc2md-api-d1ox.onrender.com/api/health every 10 minutes. One free instance allows 750 hours/month, enough to stay up ~24/7.
  • Paid: upgrade the Render instance to a paid plan, which never sleeps.

If the backend URL changes, update frontend-react/.env.production (or the Vercel environment variable) and redeploy.


Troubleshooting

"Connection lost: Failed to fetch" / "Conversion server is offline"

This message means the browser could not reach the FastAPI backend. It is not a frontend bug — the conversion itself runs on the Python server.

  1. Start the backend:
    cd backend
    python -m uvicorn main:app --reload
  2. Confirm it responds by opening http://localhost:8000/api/health.
  3. Go back to the app tab and press Retry connection (the status badge in the header should turn green).
  4. If you are using the deployed site, set VITE_API_BASE_URL to the public backend URL and redeploy as explained above.

The app now checks the backend automatically on load, when the tab regains focus, and before every conversion, so it can show a clear status instead of a raw Failed to fetch error.


šŸ“¤ Upload to GitHub

If you have already created an empty GitHub repository named:

MarkItDown-Web-Converter

Navigate to the project root directory:

cd MarkItDown-Web-Converter

Then run the following commands.

1. Add all project files

git add .

2. Create a commit

git commit -m "feat: complete project migration to FastAPI and React/Vite"

3. Connect the GitHub repository

If the repository has not been connected previously:

git remote add origin https://github.com/Andikaputh/MarkItDown-Web-Converter.git

4. Push the project

git push -u origin main

After the push is completed, the project will be available on GitHub.


šŸ”’ Security Notes

This project processes uploaded files temporarily on the backend.

For production deployment, consider implementing:

  • File size limits
  • File type validation
  • Upload rate limiting
  • Temporary file cleanup
  • Authentication and authorization
  • Input validation
  • Secure file handling
  • HTTPS
  • Production-grade CORS configuration

šŸ“ License

This project is licensed under the MIT License.


šŸ‘Øā€šŸ’» Author

Created by Andikaputh

GitHub: @Andikaputh

About

A privacy-first document-to-markdown converter optimized for LLM workflows. Securely extract and batch-process PDFs, Office files, and more in-memory.

doc2md-nu.vercel.app

Topics

document-conversionmarkdownmarkitdown

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Ɨ600. No cookies required.