A lightweight, zero-dependency web application that lets you drag and drop a folder of code files, auto-exclude unwanted files (node_modules, .git, .next, .venv, etc.), select specific files, and combine them into a single markdown file with optional AI prompt templates. Built with pure HTML, CSS, and JavaScript β no frameworks, no build tools.
π Live Demo: file-combiner.netlify.app
- Drag-and-Drop Upload β Drop a folder or click to browse
- Smart Auto-Exclude β Automatically filters out
node_modules,.git,.next,.venv,__pycache__,dist,build, lock files, binaries, images, and 70+ other patterns - Exclude Presets β Choose from None, Minimal, Standard, or Aggressive exclusion levels
- Custom Exclude Patterns β Add/remove your own patterns (supports wildcards like
*.log) - Max File Size Filter β Skip files larger than a configurable limit (50KBβ10MB)
- File Selection β Select all, none, code files only, or filter by type (components, styles, config)
- Search β Real-time search bar to find files instantly
- Markdown Generation β Combine files into markdown with optional fenced code blocks and language-specific syntax highlighting
- Folder Tree View β Optionally include a visual folder structure in the output
- Minification β Strip comments and whitespace from code output
- AI Prompt Templates β 10 pre-built prompts (debug, refactor, explain, optimize, review, test, document, security, architecture, convert)
- Custom Prompts β Add your own prompt or project context template
- Copy to Clipboard β One-click copy using modern Clipboard API
- Download β Export as
.mdor.txt
- Token Counter β Estimates token count for AI model compatibility
- Token Limit Selector β Presets for GPT-3.5 (4K/16K), GPT-4 (8K), GPT-4 Turbo (128K), Claude 3.5 (200K), Gemini 1.5 (1M)
- Token Progress Bar β Visual indicator with safe/warning/danger states
- Language Breakdown β Bar chart showing file type distribution across your project
- Dark/Light Theme β Toggle with persistent preference
- File Preview β Click the ποΈ icon to preview any file before combining
- Toast Notifications β Non-intrusive feedback for all actions
- Responsive Design β Mobile-first layout that works on all screen sizes
- Accessibility β ARIA attributes and keyboard navigation
- Persistent Settings β Theme, exclude patterns, and max size saved to localStorage
- Zero Dependencies β Pure HTML/CSS/JS, no frameworks or build tools
- Transparency β See exactly which files were excluded and why
- Expandable Details β Collapsible list showing excluded file paths and reasons
| Category | Patterns |
|---|---|
| Package Managers | node_modules, package-lock.json, yarn.lock, pnpm-lock.yaml |
| Build Output | dist, build, out, .next, .nuxt, .svelte-kit, .output |
| Version Control | .git |
| Python | .venv, venv, __pycache__, *.pyc |
| Cache | .cache, .turbo |
| System | .DS_Store, Thumbs.db |
| Logs | *.log, *.lock |
| Test Coverage | coverage, .nyc_output |
| Environment | .env, .env.local |
The Aggressive preset adds 70+ more patterns including images, fonts, binaries, IDE folders, and compiled files.
| Technology | Purpose |
|---|---|
| HTML5 | Semantic structure with ARIA accessibility |
| CSS3 | CSS variables, dark mode, responsive design, custom animations |
| JavaScript (ES6+) | File processing, UI interactions, markdown generation |
| Netlify | Static site hosting with continuous deployment |
Zero external dependencies β no React, no Tailwind, no GSAP, no build step.
- A modern web browser (Chrome, Firefox, Edge, Safari)
- Git for version control
- A Netlify account for deployment (optional)
git clone https://github.com/Manan-49/file-combiner.git
cd file-combinerJust open index.html in your browser, or use a local server:
# Using Python
python -m http.server 8000
# Using Node.js
npx serve .
# Using VS Code
# Install "Live Server" extension and click "Go Live"- Push to GitHub
- Connect the repository on Netlify
- Set publish directory to
.(root) - Deploy β no build command needed
file-combiner/
βββ index.html # Main HTML structure
βββ script.js # All application logic
βββ styles.css # Styles with CSS variables & dark mode
βββ netlify.toml # Netlify deployment config
βββ README.md # This file
- Drop a folder onto the drop zone (or click to browse)
- Configure exclusions β Choose a preset or add custom patterns
- Select files β Use Select All, Code Files, or pick individually
- Search & filter β Find specific files by name or type
- Preview β Click ποΈ to view file contents before combining
- Set options β Toggle code blocks, folder tree, minification
- Combine β Click "π Combine Files" to generate output
- Add AI context β Apply a prompt template or project context
- Check tokens β Select your AI model and verify token count
- Export β Copy to clipboard or download as
.md/.txt
- β Auto-exclude patterns (70+ for node_modules, .git, .next, .venv, etc.)
- β Configurable exclude UI with presets (None/Minimal/Standard/Aggressive)
- β Custom exclude patterns with wildcard support
- β Max file size filter
- β Excluded files transparency panel
- β Real-time file search
- β Dark/Light theme toggle
- β File preview modal
- β Language breakdown chart
- β Token limit selector (GPT-3.5/4/Claude/Gemini)
- β Token progress bar with warnings
- β Folder tree view in output
- β Download as .txt
- β Toast notifications
- β localStorage persistence
- β Modern Clipboard API
- β Removed GSAP dependency (zero dependencies)
- β Bug fixes (event handling, proper reset, accessibility)
- Initial release with drag-and-drop, file selection, code blocks, and AI prompts
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Commit changes:
git commit -m "Add my feature" - Push to branch:
git push origin feature/my-feature - Open a Pull Request
This project is open source and available under the MIT License.
Manan β GitHub
