- Category
- Developer Tools
- Rank
- No. 1727Tools index
- Pricing
- Open Source
- Type
- TOOL
- Builder
- czlonkowski
- GitHub
- 4 stars
- Date
About
Self-hostable HTTP service that converts xlsx, csv, docx, pdf, and more to markdown via MarkItDown. Drop-in n8n sidecar.
What it does
Doc2md accepts one uploaded file, identifies its real type from its bytes, converts its contents into Markdown, and returns useful metadata. Spreadsheet responses can include worksheet names, while oversized, empty, and unsupported uploads receive explicit errors.
Why it's ranked here
This is a focused conversion component with practical operational choices. Its broad format gate, predictable JSON response, container health check, upload limit, multi-architecture builds, and tested failure cases make it credible for private automation systems.
What's good
Byte-based type detection avoids trusting misleading filenames. Spreadsheet output preserves worksheet structure and reports tab names for downstream chunking. Responses also expose input type, byte count, and conversion duration. The container runs as a non-root user and includes a health check.
Tradeoffs
The service deliberately provides no authentication or rate limiting, and it allows cross-origin requests broadly. It buffers each upload in memory before conversion. Image text extraction and audio transcription require an optional external API key, despite those formats passing initial validation.
How to use it well
Use it inside a private container network when an automation, ingestion, or retrieval pipeline needs Markdown from mixed office files. Put an authenticated reverse proxy in front if exposure is necessary. It handles conversion, not access control, traffic management, downstream chunking, indexing, or retrieval.
Technical notes+
api/main.py defines a FastAPI application with /, /healthz, and /convert; the conversion route reads uploads in 1 MB chunks into a bytearray, enforces MAX_UPLOAD_MB, sniffs the first 2048 bytes through python-magic, checks SUPPORTED_MIME_TYPES, and passes an in-memory stream to MarkItDown. _enumerate_xlsx_tabs uses openpyxl in read-only mode for spreadsheet sheet names. requirements.txt pins FastAPI, Uvicorn, python-magic, python-multipart, and openpyxl while allowing MarkItDown 0.1.5 or newer. Dockerfile uses Python 3.11 slim, installs libmagic, creates UID 1000, exposes port 8000, and runs Uvicorn. tests/test_convert.py exercises health, root, XLSX, CSV, DOCX, unsupported, oversized, and empty-upload behavior. .github/workflows/docker-publish.yml builds linux/amd64 and linux/arm64 images.
Observed
- License
- MIT
- Primary language
- Python
- Packaging
- Docker image published through GitHub Container Registry; local installation uses requirements.txt
- Interface
- HTTP JSON API with multipart file upload, health endpoint, root metadata endpoint, and interactive FastAPI documentation
- Platform support
- Container builds target linux/amd64 and linux/arm64
- Test structure
- End-to-end FastAPI tests cover successful conversions and key upload error cases
Read from README.md, requirements.txt, api/main.py, tests/conftest.py, tests/test_convert.py, LICENSE, Dockerfile, CHANGELOG.md, docker-compose.example.yml, .github/workflows/docker-publish.yml.
What it can do
Convert Excel files to markdown
xlsx file → Markdown text
Convert CSV files to markdown
csv file → Markdown text
Convert Word documents to markdown
docx file → Markdown text
Convert PDF documents to markdown
pdf file → Markdown text
Process file conversions via HTTP API
HTTP request with file → HTTP response with markdown
Integrate with n8n workflows as sidecar service
n8n workflow trigger → Converted markdown for workflow
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.
