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

The right preview workflow in Visual Studio Code depends on the file you are editing. For Markdown, use VS Code’s built-in rendered preview (Ctrl+Shift+V on Windows/Linux, or Markdown: Open Preview to the Side with Ctrl+K V). For HTML, select Show Preview in the editor title bar. If you need a local web server and automatic browser refresh while editing, install Microsoft’s Live Preview extension.

Choose the preview that matches your file

What you are previewing Best starting point Needs a local server? Where it appears
Markdown (.md) Built-in Markdown preview No Editor pane
One local HTML file Editor Show Preview No for the basic preview Preview pane or browser
A web page with assets and reloads Microsoft Live Preview Yes; the extension starts one Integrated or external browser
VS Code for the Web (vscode.dev) Browser-compatible preview features Browser-dependent Web editor and browser

Preview Markdown in VS Code

Open the rendered preview

  1. Open a folder in VS Code and open a file ending in .md. If you create a new file, save it with that extension first.
  2. Press Ctrl+Shift+V on Windows or Linux. You can also open the Command Palette and run Markdown: Open Preview.
  3. VS Code opens the rendered document in a preview editor. Continue editing the source; the rendered pane updates as you work.

Keep source and preview side by side

Run Markdown: Open Preview to the Side, or press Ctrl+K V on Windows/Linux. The source remains editable while the rendered result stays visible beside it. macOS uses the equivalent shortcuts shown in VS Code’s current keyboard-shortcut reference, so use the Command Palette if the key combination differs on your installation.

Lock, scroll, and render richer Markdown

  • Lock a preview: Use the preview toolbar’s lock control when you want a rendered document to remain tied to one source file while opening another Markdown file.
  • Synchronize scrolling: When source and preview are side by side, the preview can follow your position in the source, making long-document editing easier.
  • Mermaid: Mermaid diagrams render when placed in a fenced code block labeled mermaid.
  • Math: Mathematical notation is rendered with KaTeX.

Understand Markdown preview security

Markdown preview starts in Strict security mode. Scripts are disabled and images loaded over HTTP are blocked. If a trusted workspace needs different behavior, use the preview security control or run Markdown: Change preview security settings. Changing the policy can allow content that the strict default intentionally prevents, so only relax it for files and workspaces you understand.

Preview an HTML file

Use the built-in Show Preview command

  1. Open the .html file, such as index.html.
  2. Look at the editor title bar and select Show Preview.
  3. Edit the HTML and save or continue typing. The preview updates in real time as the document changes.

This is convenient for a self-contained page or a quick check of markup and styles. If your page relies on several files, client-side modules, fetch requests, routing, or server-like behavior, use a local development server instead of treating a file preview as a production-equivalent environment.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
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

Open local HTML in the integrated browser

VS Code can display local .html and .htm files in its integrated browser. This keeps the page inside the editor while you inspect the result. You can instead open the local page in your normal external browser when you need browser extensions, device emulation, or the browser’s own developer tools.

Get live reload with Microsoft Live Preview

Install and start the extension

  1. Open the Extensions view in VS Code.
  2. Search for Live Preview and install the extension published by Microsoft. Check the publisher name before installing similarly named extensions.
  3. Open your project folder and then open index.html.
  4. Right-click in the editor and choose Show Preview.
  5. Live Preview launches a local development server. Change the HTML, CSS, or other supported page content; the browser automatically refreshes to show the latest version.

Live Preview is useful when a plain editor preview is not enough: the server supplies an HTTP origin, serves related files, and removes the repeated save-refresh cycle from static-page work. It is still a development server, not a replacement for your application’s real backend, build pipeline, authentication, or production hosting.

Use the integrated browser for Live Preview

To keep the Live Preview page inside VS Code, enable the livePreview.useIntegratedBrowser setting. Open Settings, search for that exact setting name, and enable it. You can also edit the setting in settings.json:

{
  "livePreview.useIntegratedBrowser": true
}

If the setting is disabled, the preview can open in your regular browser instead. The choice affects where the page is displayed, not whether your files are served by Live Preview.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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

Preview workflows for common projects

Readme or documentation editing

Use Markdown preview. Open the file beside its source, check headings, links, tables, Mermaid diagrams, and equations, then review the strict-security behavior before relying on scripts or remote HTTP images.

A single static page

Use the HTML editor’s Show Preview action for the fastest feedback. This avoids extension setup and is appropriate when the page does not require a server origin.

A multi-file front-end prototype

Use Live Preview from the project folder. Confirm that relative paths point to the workspace files, then choose the integrated browser if you want the result beside your code.

A page that calls an API

Start with Live Preview, but remember that a local server does not remove cross-origin rules, authentication requirements, or API availability problems. Diagnose those in the browser console and network panel rather than assuming the preview itself is broken.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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.

When preview output is different from the source

Markdown looks unformatted

  • Confirm the file is saved with a .md extension.
  • Check that headings have a space after the hash characters and that fenced code blocks have matching opening and closing fences.
  • For Mermaid, use a mermaid language label exactly; for formulas, verify the KaTeX-compatible notation.

Images or scripts do not appear in Markdown

Strict security blocks scripts and HTTP images by design. Use HTTPS image URLs where appropriate, or change the Markdown preview security policy only in a trusted workspace. Do not treat a relaxed preview policy as a safety recommendation for untrusted Markdown.

HTML styles or images are missing

  • Check relative paths against the workspace and the document location, including capitalization.
  • Make sure the referenced file is inside the served project and that its extension is correct.
  • Reload the preview after moving files or changing the project root.

The page does not refresh

  • Verify that you started Live Preview rather than only opening a file.
  • Confirm that the editor is showing the intended workspace folder and file.
  • Stop and run Show Preview again if the server became stale.
  • Inspect the browser console for JavaScript exceptions; a script error can make the page appear unchanged even when the server refreshed it.

The integrated browser is unavailable

Use an external browser, or disable livePreview.useIntegratedBrowser. Browser capabilities vary between desktop VS Code and browser-hosted VS Code, so a setting available in one environment may not be available in another.

VS Code for the Web limitations

In vscode.dev, Markdown preview is available and web-language support for HTML and CSS is close to the desktop experience. The browser edition does not provide the desktop terminal or debugger, and only extensions that support browser execution can run. If your workflow depends on a local process, a full terminal, or a desktop-only extension, use the desktop application or an externally hosted development environment.

Preview a finished page without setting up a browser workflow

Or skip the browser setup

When you need an image or PDF of a URL rather than an interactive editing session, ScreenshotNeo provides a website screenshot API and MCP server. It accepts a consent banner before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response reports the page verdict and billing status in X-Page-Verdict and X-Billed headers.

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

One GET request returns PNG, JPEG, WebP, or PDF output:

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
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 ScreenshotNeo API documentation for parameters and response handling. Python and Node.js equivalents are below.

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

ScreenshotNeo also offers an MCP server for Claude, Cursor, and other MCP clients, with take_screenshot, get_page_info, and capture_pdf tools. Its 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.

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

Performance, reliability, and cost considerations

  • Editor preview: Fastest for a single file because there is no server process to configure, but it does not model every production-server behavior.
  • Live Preview: Adds a local server and automatic refresh, which is more representative for linked static assets but introduces a process and port that can fail or be blocked.
  • Integrated browser: Keeps context in VS Code, while an external browser generally offers broader debugging and extension support.
  • Remote capture: ScreenshotNeo is useful for repeatable URL-to-image or PDF jobs, with caching TTLs, async jobs, signed webhooks, bulk capture of up to 100 URLs per call, and a usage API. Those are capture-service features, not substitutes for debugging source code locally.

FAQ

Can VS Code preview JavaScript by itself?

The HTML preview can display a page and its client-side behavior, but it is not a general JavaScript debugger or backend runtime. Use the browser’s developer tools and a suitable local development server for application debugging.

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

Why does Ctrl+Shift+V do nothing?

The shortcut is for Markdown preview on Windows and Linux. Ensure the active file is recognized as Markdown, or run Markdown: Open Preview from the Command Palette.

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.

Is Live Preview the same as hosting my website?

No. It is a local development server for feedback while you edit. Deployment, production security, scaling, and server-side behavior still require your normal hosting and application stack.

Frequently Asked Questions

Can I preview Markdown and HTML at the same time?

Yes. Open the Markdown preview in a split editor group, then open the HTML file and choose Show Preview or Live Preview in another group.

Does VS Code for the Web include the same terminal as desktop VS Code?

No. vscode.dev lacks the desktop terminal and debugger, and extensions must support browser execution.

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

What should I use for a PDF of a public URL?

Use a URL capture service such as ScreenshotNeo’s capture_pdf MCP tool or API workflow rather than the source-file preview commands.

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.