Convert various file types to Markdown with a single command.
- API Documentation - REST API endpoints and usage for server integration
- Browser Usage - JavaScript API for browser-side file conversion
- Supported Converters - Detailed information about file format converters and their capabilities
- Documents: PDF, DOCX, PPTX, XLSX, TXT
- Code: JS (JSX), TS (TSX), PY, JAVA, CS, HTML, CPP, C, GO, SQL, PHP, SWIFT, CSS, RUBY, RUST, KOTLIN, LUA, MATLAB, SHELL, VUE, SVELTE
- Archives: ZIP, 7Z
Node >= v23.5.0
# Install
npm install filetomarkdown@latest
# Try example conversions
npx filetomarkdown-test --github
-
Command Line (make sure to navigate to your file's directory in cmd first)
filetomarkdown-convert "input.pdf" filetomarkdown-convert "input.pdf" "output.md"
-
Markdown Viewer
# Create viewer in current directory npx filetomarkdown-viewer # Or specify a target directory npx filetomarkdown-viewer /path/to/directory
This creates a standalone
viewer.html
that can:- Open and display markdown files without needing a server
- Support syntax highlighting for multiple programming languages
- Drag & drop or browse for markdown files
- Toggle sidebar for better reading experience
To use the viewer:
- Run the command above to create
viewer.html
- Open
viewer.html
in your browser - Drop markdown files onto it or use the browse button
- Your markdown files will be rendered with syntax highlighting
-
API Server
npm run start:api # Runs on http://localhost:3000