In current VS Code Desktop releases, you can preview a local HTML file without installing an extension: open the file, right-click it in Explorer (or its editor tab), and choose Open in Integrated Browser. You can also select the editor’s Show Preview button. The page renders inside VS Code and updates as you edit the HTML.
Use Microsoft’s Live Preview extension instead when you need a local development server, live reload across several pages, or behavior closer to a small website or app.
Preview a single HTML file with the built-in Integrated Browser
This is the quickest way to inspect a static file such as index.html. It does not require Live Server, Live Preview, or another extension in supported VS Code Desktop versions.
- Open VS Code Desktop and open the folder containing your HTML file (File > Open Folder).
- Open the HTML file in the editor, or locate it in the File Explorer.
- Right-click the file and select Open in Integrated Browser. If the file is already open, right-click its editor tab and choose the same command.
- Alternatively, with the HTML file active, select the Show Preview icon in the editor title bar.
- Edit and save the file. Microsoft documents the integrated preview updating as the HTML changes; if it does not, use the browser’s refresh control or reopen the preview.
The preview is useful for checking markup, CSS, images, and basic client-side behavior. Relative paths resolve from the file’s location, so keep assets in the expected folders (for example, css/site.css and images/logo.png).
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Other ways to open the integrated browser
- Open the Command Palette (Ctrl+Shift+P on Windows/Linux or Cmd+Shift+P on macOS) and run Browser: Open Integrated Browser.
- Use View > Browser.
- Select the globe/browser button in the title bar when it is available.
When you select a localhost link from the terminal, chat, or another VS Code area, VS Code’s Integrated Browser is documented as the default destination in Desktop.
When Live Preview is the better choice
Install Microsoft’s Live Preview extension when your workflow needs a server rather than a file opened directly. The extension serves the project locally and provides live reload for static and dynamic pages.
Install and start Live Preview
- Open the Extensions view with Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (macOS).
- Search for Live Preview and verify that Microsoft is the publisher.
- Select Install.
- Open your HTML file and select Show Preview, or use the command supplied by the extension.
- Continue editing. The extension’s server and live-reload workflow refresh the rendered page as files change.
Live Preview can use the Integrated Browser as its default by enabling the livePreview.useIntegratedBrowser setting. Open Settings, search for that setting, and turn it on; or edit settings.json:
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
{
"livePreview.useIntegratedBrowser": true
}
Choose the right option
| Option | Setup | What it does | Best fit |
|---|---|---|---|
| Built-in Integrated Browser | Open the HTML file and choose Open in Integrated Browser or Show Preview | Renders a local file and updates it while you edit | Quick inspection of one HTML file |
| Microsoft Live Preview | Install the extension, then choose Show Preview | Runs a local development server with live reload for static and dynamic pages | A multi-page site or app that needs server behavior |
Open an HTML file in an external browser
If you need Chrome, Edge, Firefox, or Safari’s own developer tools, use the operating system’s file association: right-click the file in your project folder and choose Open with, then select the browser. You can also copy the file’s absolute path and paste it into the browser’s address bar using a file:/// URL.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →A direct file preview is not equivalent to a server. Features that require HTTP—such as some module imports, fetch requests, service workers, or server-side routes—may fail under file:///. For those cases, use Live Preview or another local server and open its localhost URL.
Preview a site running on localhost
- Start the project’s development command in the VS Code integrated terminal, if it has one.
- Note the address and port, such as
http://localhost:3000. - Open the URL in the Integrated Browser using Browser: Open Integrated Browser, or select the localhost link in the terminal.
- If the page is blank, confirm that the process is still running and that the port in the URL matches the server output.
For a plain static folder, Live Preview is usually simpler than adding a separate command-line server. For frameworks or back ends, use the project’s documented development command so routing, environment variables, and asset processing are applied correctly.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Desktop VS Code versus VS Code for the Web
The instructions above target VS Code Desktop. VS Code for the Web runs inside a browser and has no local terminal or debugger. It can run only a subset of extensions, so a workflow that depends on a local runtime, server process, or unsupported extension may require Desktop or a remote environment.
If an option is missing in your installation, check the version and edition. Microsoft’s release notes identify direct local HTML preview in VS Code 1.121; the Integrated Browser was described earlier as a preview feature in 1.109. Menu labels can change, so use the Command Palette search when a title-bar button is not visible.
Free tools Windows power users keep installed
One-click scans. No signup required.
Common problems and fixes
“Open in Integrated Browser” is not shown
- Confirm that you are using VS Code Desktop rather than VS Code for the Web.
- Open an HTML file in the editor, then run Browser: Open Integrated Browser from the Command Palette.
- Update VS Code if you are on an older release; direct local HTML preview is documented in the 1.121 release notes.
The preview does not update
- Save the file and wait for the reload.
- Refresh the Integrated Browser.
- Close and reopen the preview if a stale document remains.
- If you are using Live Preview, verify that the extension is enabled and that the preview is connected to the correct workspace folder.
CSS, images, or scripts are missing
- Check relative paths and capitalization. A reference such as
css/site.cssmust match the actual folder and filename. - Open the browser developer tools and inspect the Console and Network panels for 404 errors.
- Make sure the file is inside the opened workspace or that your server exposes its directory.
JavaScript modules or fetch calls fail
Many browser security rules treat a file:/// page differently from an HTTP origin. Start Live Preview or your project’s development server and test through http://localhost instead.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Routes work on the home page but not when refreshed
This usually indicates that a single-page application needs server fallback configuration. Use the framework’s development server or configure the local server to return the application entry file for unknown routes; a direct file preview cannot provide that behavior.
The page is blank or the server times out
- Look for an HTML syntax error or a script that throws before rendering.
- Confirm the server process has not exited and that the displayed port is correct.
- Try a minimal file containing only a heading to separate an editor problem from an application problem.
Performance, reliability, and safe preview habits
- Use the built-in preview for a fast single-file check; it has the least setup.
- Use a server-based preview when testing URL routing, modules, fetch, cookies, or dynamic responses.
- Keep the browser developer console open while debugging; it exposes parse errors and blocked requests that the rendered page may hide.
- Do not treat a local preview as production validation. Test responsive breakpoints, accessibility, authentication, caching, and server headers in an environment that matches deployment.
- Be careful with scripts from untrusted projects. A local page can execute JavaScript in the preview context, and project tasks or extensions may have additional access.
Or skip the browser setup: capture a clean screenshot with ScreenshotNeo
If your goal is a shareable image or PDF of the rendered page rather than interactive debugging, ScreenshotNeo provides a website screenshot API and MCP server. It accepts a URL and returns PNG, JPEG, WebP, or PDF. Unlike a local preview, it loads the page remotely, so publish the page or expose a reachable staging URL first.
One GET request is enough:
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 documentation for all parameters. The same request in Python is:
Recommended Free Tools
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
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)
And in Node.js:
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 can accept consent banners before capture and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing result. Its MCP server supplies take_screenshot, get_page_info, and capture_pdf tools 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.
Frequently asked questions
Do I need Live Server or Live Preview just to view an HTML file?
No. In supported VS Code Desktop releases, the Integrated Browser opens a local HTML file directly. Install Live Preview when you specifically need a local server and live reload workflow.
Can I use the Integrated Browser for a production URL?
Yes. Run Browser: Open Integrated Browser and enter the URL, subject to your network, authentication, and security policies. For a local file, however, a server-based preview may be necessary for HTTP-only features.
Why is the preview different from my deployed site?
Local files may use different origins, headers, asset paths, environment variables, and server-side routing. Compare the deployed URL or a representative staging server when those details matter.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchFrequently Asked Questions
Which VS Code edition supports the built-in HTML preview?
The documented workflow is for VS Code Desktop. VS Code for the Web has different terminal, debugger, and extension limitations; older Desktop releases may not expose the same commands.
Can Live Preview open its page in VS Code’s browser?
Yes. Enable the livePreview.useIntegratedBrowser setting, then start Live Preview.
Quick Recap
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.

