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.
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.
- 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
The application consists of two main components:
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
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
MarkItDown-Web-Converter/
āāā backend/
ā āāā main.py
ā
āāā frontend-react/
ā āāā src/
ā āāā public/
ā āāā package.json
ā āāā vite.config.js
ā
āāā README.md
Follow the steps below to run the project locally.
Make sure the following are installed on your machine:
- Python 3.10+
- Node.js 18+
- npm
- Git
Open a terminal and navigate to the backend directory:
cd backendInstall 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
Open a new terminal and navigate to the React frontend directory:
cd frontend-reactInstall the required dependencies:
npm install
Start the Vite development server:
npm run dev
The web application will be available at:
http://localhost:5173
Converts an uploaded document into a Markdown string.
The endpoint expects a multipart/form-data request containing a file field.
Field:
file
{
"success": true,
"filename": "document.pdf",
"markdown_content": "# Parsed Text..."
}| Field | Type | Description |
|---|---|---|
success |
boolean |
Indicates whether the conversion was successful |
filename |
string |
Original uploaded filename |
markdown_content |
string |
Converted Markdown content |
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
The application supports document formats handled by Microsoft MarkItDown.
Common examples include:
- 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.
| Layer | Technology |
|---|---|
| Frontend | React |
| Build Tool | Vite |
| Backend | FastAPI |
| Programming Language | Python |
| Document Conversion | Microsoft MarkItDown |
| API Server | Uvicorn |
| Package Manager | npm / pip |
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
The application has been deployed as a publicly accessible web application.
The frontend is hosted and available at:
Users can access the application directly from a web browser without installing the project locally.
For development purposes, the frontend and backend can still be run locally using the instructions provided in the Getting Started section.
The frontend talks to FastAPI through VITE_API_BASE_URL:
- Local development (
npm run dev) ā leave the variable empty. Vite proxies/api/*tohttp://localhost:8000(seefrontend-react/vite.config.js). - Production (Vercel, Netlify, ...) ā
frontend-react/.env.productionalready 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 onlocalhost.
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.
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/healthevery 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.
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.
- Start the backend:
cd backend python -m uvicorn main:app --reload - Confirm it responds by opening http://localhost:8000/api/health.
- Go back to the app tab and press Retry connection (the status badge in the header should turn green).
- If you are using the deployed site, set
VITE_API_BASE_URLto 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.
If you have already created an empty GitHub repository named:
MarkItDown-Web-Converter
Navigate to the project root directory:
cd MarkItDown-Web-ConverterThen run the following commands.
git add .git commit -m "feat: complete project migration to FastAPI and React/Vite"If the repository has not been connected previously:
git remote add origin https://github.com/Andikaputh/MarkItDown-Web-Converter.git
git push -u origin main
After the push is completed, the project will be available on GitHub.
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
This project is licensed under the MIT License.
Created by Andikaputh
GitHub: @Andikaputh