A fast, free, and open‑source Markdown editor with a beautiful live preview. Built with modern web tech, perfect for docs, READMEs, notes, and blogs.
🌐 Try it live | 📖 Documentation | 🐛 Report Issues
- Real‑time preview powered by
react-markdown+ GFM - Eight themes: default, Dark, GitHub, Notion, Medium, Paper, Minimal, Terminal
- Syntax highlighting (highlight.js) with copy‑code buttons and language badges
- GFM extras: tables, task lists, strikethrough, autolinks
- Import
.md, export.md/.html(print to PDF via browser) - View modes: Editor, Preview, or Split with draggable resize
- Keyboard: Cmd/Ctrl+1/2/3 to switch view modes
- Mobile‑friendly, accessible roles/labels, localStorage persistence
- Safe by default: raw HTML rendering disabled
# Clone the repository
git clone https://github.com/celery94/md-view.git
cd md-view
# Install dependencies (uses lockfile)
npm ci
# Start development server
npm run devOpen http://localhost:3000 in your browser.
# Build for production
npm run build
# Start production server
npm run start- Framework: Next.js 15 with App Router
- UI Library: React 19
- Language: TypeScript
- Styling: Tailwind CSS +
@tailwindcss/typography - Markdown: react-markdown with remark-gfm
- Syntax Highlighting: highlight.js
- Icons: lucide-react
app/— Next.js App Router entries (page.tsx,layout.tsx) andglobals.csscomponents/— UI modules (MarkdownEditor.tsx,MarkdownPreview.tsx, selectors, menus)lib/— Shared utilities, themes, SEO helperspublic/— Static assets (icons, images)
Requires Node 18.18+ (or 20+).
npm run dev- Start development server with Turbopacknpm run build- Build for production with Turbopacknpm run start- Start production servernpm run typecheck- TypeScript type checkingnpm run lint- Lint code with ESLintnpm run format- Format code with Prettiernpm run format:check- Check code formatting
- Switch themes from the preview header; state persists across reloads.
- Split view is resizable and sync‑scrolls between editor and preview.
- Use browser Print to save PDF (export HTML is also available).
- Headings receive stable IDs for deep links; visible “#” anchor icons are disabled by default for a cleaner look.
- Raw HTML in markdown is disabled (
skipHtml: true) to prevent XSS. - Code highlighting uses
rehype-highlight; HTML injection is not allowed. - No external data collection; analytics (if enabled) is anonymized pageview only.
- Typography via Tailwind
prose; custom styles for code, tables, blockquotes. - Lists are tuned for readability: dot bullets, consistent indent, improved markers; task lists align checkboxes with text.
- Images are lazy‑loaded and styled with borders/shadows.
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- No Vendor Lock-in: Your content stays with you
- Open Source: Transparent, auditable, and free forever
- Modern Tech: Built with the latest web technologies
- Performance First: Optimized for speed and efficiency
- User-Centric: Designed with the user experience in mind
- Live Demo: https://www.md-view.com/
- GitHub: https://github.com/celery94/md-view
- Issues: https://github.com/celery94/md-view/issues
Made with ❤️ by the MD-View team. Star ⭐ this repository if you find it useful!
- Tasks and roadmap: see
todo.md. - Code themes are scoped with classes like
code-theme-github. - Editor content and pane ratio persist in
localStorage(mdv:*).