Write Gmail messages in Markdown, format them as you type, and convert drafts to clean rich text without leaving Gmail.
Install Markdown for Gmail from the Chrome Web Store
Free and open source. All formatting and conversion happen locally in your browser.
- Markdown → rich text — write Markdown, then press
Ctrl+Shift+Mor use the right-click menu to render it inside Gmail. - Rich text → Markdown — reverse the conversion with
Ctrl+Shift+H. - Live auto-formatting — turn headings, lists, blockquotes, emphasis, code, and dividers into formatted content as you type.
- Slash commands — type
/to insert headings, lists, quotes, code blocks, tables, dividers, and notes from the keyboard. - Editable tables and nested lists — move through table cells with
Tab, add rows and columns, and indent or outdent list items withTab/Shift+Tab. - GitHub Flavored Markdown — tables, task lists, strikethrough, and more via Marked.
- Emoji shortcodes — type
:rocket:,:heart:, and 1,000+ GitHub-style shortcodes. - Copy threads as Markdown — export Gmail conversations as clean Markdown without signatures or duplicated quoted replies.
- Paste-friendly editing — pasted multiline content keeps its order when you format individual lines later.
- Gmail-compatible themes — choose between Default and Bold styling in the extension options.
- Custom shortcuts — replace the default Markdown conversion shortcut with your preferred modifier+key combination.
The easiest way to install the extension is from the Chrome Web Store:
Add Markdown for Gmail to Chrome
After installation, open or refresh Gmail and compose a message.
Use this method for development or local testing:
- Clone or download this repository.
- Open
chrome://extensionsin Chrome. - Enable Developer mode.
- Click Load unpacked.
- Select the repository folder.
- Open Gmail and start a new message.
- Write your message using Markdown.
- Press Ctrl+Shift+M or right-click and choose Convert Markdown to Rich Text.
- Continue editing the formatted message normally in Gmail.
To convert formatted content back to Markdown, press Ctrl+Shift+H or use Convert HTML to Markdown from the right-click menu.
Example Markdown:
# Project update
Hi team,
- Shipped the new onboarding flow
- Fixed the billing regression
- Next: performance testing
> Launch is still scheduled for Friday.
Thanks!When Auto-format is enabled, Markdown syntax is converted as you type.
| Type | Then press | Result |
|---|---|---|
# |
Space | Heading 1 |
## |
Space | Heading 2 |
### |
Space | Heading 3 |
* or - |
Space | Bullet list |
1. |
Space | Numbered list |
> |
Space | Blockquote |
--- |
Space or Enter | Horizontal rule + new line |
**text** |
Space | Bold |
*text* |
Space | Italic |
~~text~~ |
Space | |
`text` |
Space | Inline code |
To remove heading or blockquote formatting, place the cursor at the start of the line and press Backspace.
At the start of a compose line, type / to open the formatting menu. Keep typing to filter commands.
- Use Arrow Up and Arrow Down to change the selected command.
- Press Enter or Tab to apply it.
- Press Escape to close the menu.
- Click a command to apply it with the mouse.
| Command | Result |
|---|---|
/h1 |
Heading 1 |
/h2 |
Heading 2 |
/h3 |
Heading 3 |
/bullets |
Bullet list |
/numbered |
Numbered list |
/quote |
Blockquote |
/code |
Code block |
/table |
Editable 2-column table |
/divider |
Horizontal rule |
/note |
Gray callout |
Aliases such as /title, /heading, /subheading, /bullet, /ordered, /blockquote, and /codeblock are also searchable.
- Press Tab inside a list item to nest it under the previous item.
- Press Shift+Tab to move a nested item back one level.
- List conversion preserves the current line position, including content edited after a multiline paste.
/table inserts a two-column table with one header row and two body rows.
- Press Tab to move to the next cell.
- Press Shift+Tab to move to the previous cell.
- Press Tab from the final cell to add a row.
- Use Add row or Add column to expand the table.
- Use Delete row or Delete column to remove content.
- Deleting the final row or column removes the table and leaves a writable line.
Table styling is designed to survive Gmail rendering without interfering with Gmail's native scheduling widgets.
Open the extension icon → Options, or go to chrome://extensions → Details → Extension options.
| Option | Description |
|---|---|
| Convert on Paste | Automatically convert Markdown when pasting text |
| GitHub flavored Markdown | Enable GFM features such as tables and task lists |
| Theme | Choose Default or Bold styling |
| Custom Shortcut | Override the default Ctrl+Shift+M shortcut |
| Disable default shortcut | Turn off the built-in Markdown conversion command |
Default is the recommended minimal theme, with Gmail-compatible typography and subtle heading and blockquote styling.
Bold increases visual contrast with stronger, uppercase headings while keeping the same Gmail-compatible blockquote treatment.
Markdown for Gmail performs formatting and conversion locally in the browser. It does not send email content to an external service.
The extension only requests access needed for its Gmail integration, settings, context menu, and clipboard features. See PRIVACY.md for the full privacy policy.
Gmail sanitizes email HTML aggressively, so the extension includes formatting safeguards designed specifically for Gmail:
- Blockquotes are rendered in a Gmail-safe form so their visual styling is preserved.
- Styles are applied inline where needed instead of relying on separate style blocks Gmail may remove.
- Tests guard against unsupported layout CSS that could be stripped or interfere with Gmail UI.
- Node.js
- Chrome or Chromium for manual testing
npm installnpm test
npm run test:e2eThe test suite covers Markdown and HTML conversion, emoji replacement, themes, slash commands, keyboard navigation, nested lists, editable tables, pasted multiline content, Gmail-safe styling, and Playwright browser flows.
Open test/visual-testbed.html in a browser to test formatting and conversion in a mock Gmail compose window without installing the extension.
- Update the
versionfield inmanifest.json. - Keep the version synchronized with
package.jsonandpackage-lock.json. - Run:
npm run build:zipThis creates gmail-markdown-v<version>.zip from the runtime-file allowlist, excluding tests, development files, old archives, and node_modules.
├── manifest.json # Chrome Extension Manifest V3
├── background.js # Service worker, context menus, command handling
├── contentScript.js # Compose editor behavior and live formatting
├── threadCopy.js # Copy Gmail threads as Markdown
├── injector.js # Markdown → HTML conversion
├── html2md.js # HTML → Markdown conversion
├── turndown.js # HTML-to-Markdown converter
├── emoji.js # 1,000+ emoji shortcode mappings
├── marked.min.js # Bundled Marked parser
├── options.html/js/css # Extension options page
├── themes.css # Gmail-compatible theme styles
├── icons/ # Extension icons
└── test/ # Unit, E2E, and visual tests
See LICENSE.