Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
Developer Tools

How to Preview Markdown Files in VS Code

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Open the .md file in Visual Studio Code and press Ctrl+Shift+V on Windows/Linux or Shift+Command+V on macOS. To keep the source and rendered document side by side, press Ctrl+K V on Windows/Linux or Command+K V on macOS. VS Code includes Markdown preview without a separate application.

Open the built-in Markdown preview

VS Code supports Markdown files out of the box, so the basic workflow needs no extension. Create or open a file whose name ends in .md, then use one of these methods:

  1. Toggle the preview: with the Markdown editor active, press Ctrl+Shift+V (Windows/Linux) or Shift+Command+V (macOS).
  2. Open beside the editor: press Ctrl+K, release both keys, then press V on Windows/Linux. On macOS use Command+K, then V.
  3. Use the tab menu: right-click the Markdown editor tab and choose Open Preview.
  4. Use the Command Palette: press Ctrl+Shift+P (Windows/Linux) or Command+Shift+P (macOS), run Markdown: Open Preview to the Side, or choose Markdown: Toggle Preview.

The side-by-side command is generally the most useful while writing: the source remains editable on the left and the rendered document appears on the right.

Keep the editor and preview synchronized

The preview normally follows the active Markdown document. As you scroll or edit, VS Code maps the corresponding location between the two panes; the selected editor line is marked in the preview. This makes it practical to inspect a long document without repeatedly searching for the same heading.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents

Lock a preview to one file

If opening another Markdown file keeps changing the preview you are inspecting, open the Command Palette and run Markdown: Toggle Preview Locking. A locked preview stays attached to its original document while you work elsewhere. Toggle the command again to return to the normal active-file behavior.

Preview a Markdown diff

Markdown changes shown in a source-control diff can be reopened in the Markdown Preview editor. This is useful for checking the rendered result of a proposed change rather than reading only the line-by-line diff. VS Code also exposes separate association settings for ordinary Markdown files and diffs.

Useful Markdown rendering features

Mermaid diagrams

Put a diagram in a fenced code block labeled mermaid:

```mermaid
flowchart LR
  A[Write Markdown] --> B[Open preview]
  B --> C[Review rendering]
```

The built-in preview can render Mermaid diagrams and provides pan and zoom for larger diagrams. Mermaid support is delivered through VS Code’s built-in Mermaid Markdown Features extension; VS Code 1.121 release notes describe its support for Markdown previews, notebook cells and chats.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

KaTeX mathematics

Use single dollar signs for inline mathematics and double dollar signs for a displayed equation:

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
Inline: $a^2+b^2=c^2$

$$
int_0^1 x^2,dx=frac{1}{3}
$$

VS Code’s Markdown preview uses KaTeX to render these expressions. If an expression appears as plain text, check the delimiters and whether the installed VS Code build includes the relevant Markdown features.

Images, links and code

Standard Markdown syntax works in the preview:

![Diagram](images/diagram.png)

[Project documentation](https://example.com)

```javascript
console.log('Rendered as a code block');
```

Prefer relative paths for images stored with the project. A moved file, incorrect capitalization, or a path that is relative to a different folder will produce a broken image even though the Markdown syntax is valid.

Configure the preview when the defaults are not enough

Custom CSS

A workspace can load additional preview styles through the markdown.styles setting. In Settings, search for Markdown: Styles, or edit settings.json:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
{
  "markdown.styles": [
    "./docs/markdown.css"
  ]
}

The path can point to a workspace file or a URL. Keep project-specific styles in the repository when teammates need the same appearance, and review remote styles before allowing them.

Default editor associations

The workbench.editorAssociations setting can make the preview the default editor for .md files. Use workbench.diffEditorAssociations when you want a special association only for Markdown diffs. These settings change how files open; they do not remove the normal preview commands.

Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

Extensions

Extensions can add preview styles and scripts through markdown.previewStyles and markdown.previewScripts. Open the Extensions view from the Activity Bar or press Ctrl+Shift+X. Marketplace listings expose publisher information, ratings, Q&A and update behavior, but installing an extension is a trust decision: an extension host can read and write files, make network requests, run processes and modify workspace settings.

  • Check the publisher identity and repository.
  • Read the license and support information.
  • Review requested permissions and recent update history.
  • Install only what the built-in preview cannot provide.

Why images or scripts are blocked

Markdown preview is deliberately isolated. Its strict security mode disables script execution, loads only trusted content and blocks images served over plain http. A local image or an https image can therefore render while an otherwise valid HTTP image does not.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Allow insecure content

If you control the document and must display an HTTP resource, open Settings and find the Markdown preview security setting, or use the Command Palette to locate the Markdown preview security commands. Allow insecure content permits HTTP resources but continues to disable scripts. This is the safer choice when the only problem is an old image URL.

Disable protection only for trusted content

The Disable option removes additional preview protections and permits scripts. Use it only for Markdown files and workspaces you fully trust; do not use it merely to make an unknown README render. Restore strict mode after inspecting a trusted document.

Workspace Trust is separate

For an unfamiliar repository, VS Code may open in Restricted Mode. That boundary helps prevent automatic code execution by VS Code and extensions until you trust the folder. Preview security and Workspace Trust address different risks, so changing one does not eliminate the other.

Rank #4
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

Troubleshoot a blank or incorrect preview

The shortcut does nothing

  • Click inside the Markdown editor first; the command acts on the active editor.
  • Confirm the file ends in .md and that VS Code identifies its language mode as Markdown.
  • Open the Command Palette and run Markdown: Toggle Preview to bypass a keyboard-layout or shortcut conflict.
  • Check Keyboard Shortcuts for another command assigned to the same keys.

The preview shows old content

Save the file, check that the preview is not locked to another document, and verify that you are editing the file whose tab is being previewed. A second open copy of a file can also make the active document unclear.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

An image is broken

  • Resolve the path from the Markdown file’s folder, not from the workspace root unless the path actually starts there.
  • Use forward slashes and match filename capitalization, especially in repositories checked out on case-sensitive systems.
  • Confirm the file is inside the workspace or otherwise readable by VS Code.
  • For remote images, use HTTPS or deliberately choose the less-protective setting for a trusted document.

Mermaid or math is plain text

Check the fence label (mermaid must be lower-case in the usual form), closing fences and math dollar signs. Update VS Code if the built-in Mermaid Markdown Features extension is missing or disabled, and inspect the Problems or developer console output for malformed diagram or KaTeX syntax.

Scripts do not run

That is expected in strict mode. Do not enable scripts to preview ordinary Markdown. If a trusted document genuinely requires script-based rendering, review its source and workspace trust status first, then use the least permissive setting that meets the requirement.

Preview versus exporting a final artifact

VS Code preview is an interactive development view. It is ideal for checking headings, links, images, diagrams and equations while you edit, but it is not automatically a pixel-identical PDF or website build. If you need a deliverable, use the project’s documented Markdown-to-HTML or PDF tool and inspect that output separately. Differences can come from custom CSS, fonts, page breaks, unsupported extensions and security restrictions.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your goal is a shareable screenshot of a rendered page rather than an interactive editor preview, ScreenshotNeo provides a website screenshot API and MCP server. A single request returns PNG, JPEG, WebP or PDF. It accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups and chat widgets; each step can be turned off. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and response headers identify the page verdict and whether it was billed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

After publishing your Markdown as a web page, capture it with cURL:

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the full parameter reference in the ScreenshotNeo documentation. The same API supports full-page captures, CSS-selector elements, device presets, custom viewports, dark mode, retina scale, PDF paper settings, custom CSS and JavaScript, click and wait actions, request blocking, cookies, headers, user agents, timezone and geolocation, transparent backgrounds, resizing, chosen cache TTLs, signed image links, asynchronous webhooks, bulk capture of up to 100 URLs per call, usage data and an OpenAPI specification. Its parameter names are compatible with those used by many screenshot APIs, which can simplify migration.

ScreenshotNeo also offers an MCP server with take_screenshot, get_page_info and capture_pdf for Claude, Cursor and other MCP clients. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account to try it.

Quick reference

Task Windows/Linux macOS
Toggle preview Ctrl+Shift+V Shift+Command+V
Open preview to the side Ctrl+K V Command+K V
Open Extensions view Ctrl+Shift+X Command+Shift+X

Frequently Asked Questions

Do I need a Markdown preview extension in VS Code?

No. Standard Markdown preview is built into VS Code; extensions are optional for extra styling, scripts or specialized syntax.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Can I preview Markdown without opening a second window?

Yes. Use the side-by-side preview command so the rendered document occupies an editor group inside the same VS Code window.

How do I stop another file from changing my preview?

Run Markdown: Toggle Preview Locking from the Command Palette to attach the preview to its current document.

Is VS Code preview suitable for untrusted README files?

Use strict preview security and keep unfamiliar repositories in Restricted Mode. Do not enable scripts or trust a workspace just to render a document.

The Bottom Line

For everyday editing, open the .md file and use Ctrl+Shift+V/Shift+Command+V; use the side-by-side shortcut when you need live source-and-rendered feedback.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read next

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.