A Node.js utility that converts various file types to Markdown:
- PDF, Word (docx), PowerPoint (pptx), Excel (xlsx)
- Text and code files
- ZIP/7ZIP archives
npm install -g filetomarkdown
# Basic conversion (creates markdown file in same folder)
filetomarkdown-convert "path/to/document.pdf"
# Convert with custom output location
filetomarkdown-convert "data/budget.xlsx" "converted/budget.md"
Want to see how different file types are converted? Run our test command to try it with example files:
npx filetomarkdown-test --github
This will:
- Create a
src
folder in your current directory - Download example files from our GitHub repository
- Convert them to markdown automatically
The created folder structure:
src/
├── exampleFiles/ # Original test files
│ ├── code/ # Sample code files (.js, .py, etc)
│ ├── documents/ # Sample documents (PDF, DOCX, etc)
│ └── archives/ # Sample ZIP/7Z files
│
├── outputAfterConversion/ # Converted markdown files
│ └── code/ # Converted code examples
│
└── viewer.html # Web-based markdown viewer
To view the results:
- Navigate to the
src
folder - Open
viewer.html
in your web browser - Browse through the converted files in the viewer