Markdown to PDF converter with live preview.
MD2FILE is a browser-based Markdown editor and Markdown to PDF converter with live preview, PDF export, HTML export, AI humanizer, AI detector, rewrite and tone tools, Mermaid diagrams, KaTeX math, and browser-local document handling for standard editing and export flows.
What loads after JavaScript: the interactive editor, preview pane, AI sidebars, drag-and-drop import, snippets, and export controls.
# Welcome to MD2FILE
MD2FILE is a browser-based Markdown workspace for private, local writing, previewing, and standard document export without leaving the editor.
This starter file is a guided tour of what the current editor can do. Use it as a feature checklist, a formatting reference, and a safe place to test exports before you replace it with your own content.
> Tip: You can start typing immediately, paste content, use snippets, open AI tools, or drag in a `.md`, `.markdown`, or `.txt` file to replace this document.
---
## Quick Feature Overview
| Area | Current support |
| --- | --- |
| Export formats | PDF, Markdown, and HTML |
| Images | Local asset paths, URL image examples, and editor image workflows |
| Math | Inline math, display math, and fenced math blocks via KaTeX |
| Diagrams | Mermaid flowcharts and related diagram rendering |
| Code | Fenced blocks, inline code, and syntax-highlighted examples |
| Structure | Tables, task lists, blockquotes, footnotes, headings, and links |
| Emojis | Colorful local emoji export by default (Beta); monochrome toggle in Settings (More Stable) |
| International text | Optional CJK PDF font support in Settings |
| PDF options | Page numbers, margins, spacing, and template selection |
| Editor tools | Snippets, AI tools, and local file import |
---
## Local-First Editing
Your Markdown stays in the editor while you work. Standard writing and normal PDF export remain local to your browser, which makes MD2FILE a strong fit for drafts, specs, notes, reports, and reference documents you want to keep under your control.
If you want to try a different document, drag a `.md`, `.markdown`, or `.txt` file into the editor and it will replace this starter file.
---
## Images & Media
The editor handles local asset paths and can also work with remote image URLs when the source allows fetching correctly. For PDF export, local and same-origin images are the safest option, while remote URLs depend on the source being fetchable.
### Local Images

### CORS-Friendly Images

You can also paste or insert a local image into the editor to test how image content behaves in the preview and export pipeline. If you want a clean on-brand image for testing, the teal MD2FILE logo is a good candidate.
---
## KaTeX Math
MD2FILE supports inline math like $E = mc^2$ inside a paragraph as well as display math for larger equations.
$$
B(x, y) = \int_0^1 t^{x-1}(1-t)^{y-1} dt
$$
---
## Mermaid Diagrams
Use Mermaid when you want fast diagrams directly inside Markdown.
```mermaid
flowchart TD
A[Write in Markdown] --> B[Preview in the Editor]
B --> C[Choose PDF Settings]
C --> D[Export to PDF]
D --> E[Download or Auto-Upload]
```
---
## Code Blocks
You can keep technical notes, configs, and scripts in the same document.
```js
const features = [
'Markdown',
'Mermaid',
'KaTeX',
'Colorful emoji export',
'CJK font support',
];
console.log(`MD2FILE loaded ${features.length} core document features.`);
```
```python
def render_status(name, ready=True):
state = "ready" if ready else "pending"
return f"{name}: {state}"
print(render_status("PDF export"))
```
```json
{
"export": "pdf",
"includePageNumbers": false,
"useColorfulEmojis": true,
"useCJKFonts": false,
"template": "original"
}
```
---
## Lists, Tasks, Tables, Quotes & Footnotes
- [x] Headings and paragraphs
- [x] Ordered and unordered lists
- [x] Task lists
- [x] Tables
- [x] Footnotes
- [x] Code fences
- [x] Mermaid diagrams
- [x] KaTeX math
- [x] Colorful emoji export
- [x] Local-first Markdown editing
1. Write a document.
2. Preview it as you go.
3. Open export settings if you need PDF customization.
4. Export when you are ready.
| Feature | What it helps with | Notes |
| --- | --- | --- |
| Tables | Specs, comparisons, reports | Good for structured PDF output |
| Task lists | Checklists and planning | Useful in docs and project notes |
| Footnotes | References and citations | Helpful for longer writing |
| Blockquotes | Callouts and quoted text | Good for notes and docs |
> MD2FILE is designed to keep the writing experience simple while still supporting technical and structured content.
Here is a footnote reference[^starter].
[^starter]: This starter document is meant to show the current editor and export feature set, not just raw Markdown syntax.
---
## Emojis & International Text
Colorful emojis (**Beta**) are now the default in PDF export, using bundled local assets rather than remote fetches.
Inline emoji test: Let's see if your PDF exporter can handle it all. 😎
Sequence test: 😀 😁 😂 🤖 🦄
Mixed content test: Status looks good ✅ and launch feels ready 🚀
If you prefer the more stable monochrome emoji glyph path, open **PDF Export Settings** and enable **Monochrome Emojis (More Stable)**.
For Chinese, Japanese, or Korean text in PDF export, enable **CJK Font Support** in **PDF Export Settings** before exporting. This starter file intentionally does not include CJK sample text, but the toggle is there specifically for documents that need it.
---
## PDF Export Options
The current PDF workflow includes more than a plain export button. You can tune the output through settings and templates.
- Export formats available from the editor: PDF, Markdown, and HTML.
- Page numbers can be toggled on in PDF settings.
- Emoji mode can be switched between colorful local assets (**Beta**) and monochrome glyphs (**More Stable**).
- CJK font support can be turned on when your document needs it.
- Margins and element spacing can be adjusted in the PDF settings modal.
- PDF templates are available for different output styles, including original, default, academic, resume, modern professional, and business-oriented layouts.
---
## Snippets, AI Tools & Workflow
The editor page is more than a text area. The current UI also includes:
- **Snippets** for reusable content blocks.
- **AI Tools** for Mermaid, LaTeX, rewriting, optimization, TOC or summary generation, smart blocks, uploads, and history.
- A save and export workflow designed to keep writing, preview, and output in one place.
This means you can use one workspace for drafting, structuring, enhancing, and exporting a document without switching contexts.
---
## Helpful Links
- [MD2FILE Website](https://md2file.com/)
- [KaTeX](https://katex.org/)
- [Mermaid](https://mermaid.js.org/)
---
**You can now delete any section of this starter file and replace it with your own document.** 🎉