A lightweight web application for converting PDF documents and other file formats to Markdown. Built on top of the MarkItDown library with Flask.
- Web-based interface for easy file conversion
- Multiple format support including:
- PDF files
- PowerPoint presentations (PPTX)
- Word documents (DOCX)
- Excel spreadsheets (XLSX, XLS)
- Outlook messages (MSG)
- And more through MarkItDown
- Automatic document structure preservation - headings, lists, tables, and links are converted to proper Markdown
- OCR support for scanned documents (optional)
- Python 3.10 or higher
- pip (Python package installer)
- Clone the repository:
git clone https://github.com/hasski0x/md.it.git
cd md.it- Create and activate a virtual environment:
python -m venv .venv
# On Windows
.venv\Scripts\activate
# On macOS/Linux
source .venv/bin/activate- Install dependencies:
pip install -r requirements.txtpython markitdown/app.pyThe application will start on http://localhost:5000 by default.
You can also use the MarkItDown library directly:
markitdown path-to-file.pdf > document.mdmd.it/
├── markitdown/ # Main application directory
│ ├── app.py # Flask web application
│ ├── convert_catalogue.py # Utility for batch conversions
│ ├── static/ # CSS and JavaScript files
│ ├── templates/ # HTML templates
│ └── packages/ # MarkItDown library and plugins
├── requirements.txt # Python dependencies
└── README.md # This file
- markitdown[pdf,pptx,docx,xlsx,xls,outlook] - Core document conversion library with optional format support
- Flask - Web framework for the application
- werkzeug - WSGI utilities for Flask
- pypdf - PDF manipulation library
- pdfplumber - PDF text extraction
See requirements.txt for the complete list of dependencies and their versions.
The Flask application runs with debug mode enabled. For production use, consider:
- Setting
app.run(debug=False) - Using a production WSGI server like Gunicorn
- Implementing proper file upload limits
- Adding authentication/authorization
This project is licensed under the MIT License. See the LICENSE file for details.
MarkItDown performs I/O with the privileges of the current process. When processing untrusted files:
- Validate and sanitize inputs
- Use the narrowest conversion function needed for your use case
- Run the application with minimal necessary permissions
- Implement file type validation before conversion
Refer to the MarkItDown Security Documentation for more details.
Contributions are welcome! Please see CODE_OF_CONDUCT.md for guidelines.
For issues and feature requests, please refer to SUPPORT.md.