Write and preview markdown in VS Code. Built-in preview, top extensions, keyboard shortcuts, and advanced tips.
VS Code markdown shortcuts and syntax at a glance.
| Feature | Syntax | Notes | |
|---|---|---|---|
| Open preview | Ctrl+Shift+V / Cmd+Shift+V | Opens markdown preview in new tab | |
| Preview side by side | Ctrl+K V / Cmd+K V | Opens preview beside editor | |
| Heading H1 | # Heading | Hash + space | |
| Bold | **bold** | Or Ctrl+B / Cmd+B with extension | |
| Italic | *italic* | Or Ctrl+I / Cmd+I with extension | |
| Code inline | `code` | Single backticks | |
| Code block | ```lang | Triple backticks + language name | |
| Link | [text](url) | Or Ctrl+K / Cmd+K with extension | |
| Image |  | Local path or URL | |
| Table | | Col | Col | | Pipe-separated; extension formats on save | |
| Task list | - [ ] todo | GFM checkbox — rendered in preview | |
| Strikethrough | ~~text~~ | GFM extension | |
| Blockquote | > quote | Greater-than sign | |
| Horizontal rule | --- | Three dashes on own line |
VS Code ships with a full markdown preview engine. No extensions needed for basic rendering.
Two ways to open the markdown preview
VS Code's built-in preview renders full GFM including math
Editor and preview scroll positions stay in sync automatically
The editor and preview scroll together. Toggle with the sync icon in the preview toolbar, or disable in settings.
These four extensions transform VS Code into a professional markdown editing environment.
The essential extension — shortcuts, TOC, table formatter, and more
Auto-formats markdown files on save — tables, line wrapping, headings
Formats tables, wraps long lines, and normalizes headings on save
Advanced preview with mermaid, math, custom themes, and export to PDF/HTML
Linting for consistent markdown style — catches common mistakes
Built-in VS Code shortcuts plus Markdown All in One additions for faster editing.
Open and manage the markdown preview pane
| Ctrl+Shift+V | Open preview in new tab |
| Ctrl+K V | Side-by-side preview |
Keyboard shortcuts added by the Markdown All in One extension
| Ctrl+B | Toggle bold |
| Ctrl+I | Toggle italic |
| Ctrl+K | Insert link on selected text |
| Alt+C | Toggle task list checkbox |
| Alt+Shift+F | Format table |
Navigate within and between markdown files
| Ctrl+Shift+O | Go to heading (outline) |
| Alt+Z | Toggle word wrap |
| Ctrl+Shift+P | Command palette → "Markdown: Create TOC" |
General VS Code editing shortcuts that work great with markdown
| Ctrl+Shift+P → Format | Auto-format entire file |
| Alt+↑ / Alt+↓ | Move line up or down |
| Shift+Alt+↓ | Duplicate current line |
Add your own shortcuts in keybindings.json for markdown actions
VS Code snippets let you insert boilerplate markdown instantly. Tasks automate Pandoc exports.
Define reusable markdown templates in .vscode/markdown.code-snippets
Automate Pandoc conversions with a VS Code task in tasks.json
.vscode/tasks.json in your projectMarkdown files work seamlessly with VS Code's built-in Git support — diffs, history, and source control.
VS Code renders word-level diffs for markdown files in the SCM panel
Enable "Diff editor: Word wrap" in settings for long markdown lines
View the full git history of any markdown file via the Timeline view
Features that require extensions or workarounds.
Use Live Share extension for real-time co-editing of markdown files
VS Code is code-first — use preview panel or extensions like Foam for wiki-style editing
This single extension adds keyboard shortcuts for bold, italic, and links; auto-formatting for lists and tables; a table of contents generator; and paste-as-markdown support. It's the most essential markdown extension for VS Code.
With Prettier installed and set as the default formatter, enable "Format On Save" in VS Code settings (Ctrl+, → search "Format On Save"). Every time you save a .md file, Prettier cleans up tables, wraps lines, and normalizes headings.
Press Alt+Z to toggle word wrap on and off. For markdown files, word wrap is almost always preferable to horizontal scrolling. You can also set "editor.wordWrap": "on" in settings.json for all files.
Press Ctrl+Shift+O (Cmd+Shift+O on Mac) to open the outline view. VS Code builds a tree of all headings in your markdown file, making long documents easy to navigate.
Everything you need to know.
Yes. VS Code has built-in markdown editing and preview support. Open any .md file and press Ctrl+Shift+V (Windows/Linux) or Cmd+Shift+V (Mac) to see the rendered preview. Press Ctrl+K V (Cmd+K V) to open the preview side by side with the editor. The built-in preview supports GFM, syntax highlighting, and math (with the built-in math renderer).
Paste your VS Code markdown into our converter and download a polished PDF in one click.