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

The quickest way to preview HTML is to save it as an .html file, open that file in a browser, and reload the page after you save changes. For automatic refresh, use an editor-integrated preview or an online editor such as CodePen. Use browser developer tools when you want to inspect or temporarily change the page as it is rendered.

Choose the right way to preview HTML

The best method depends on whether you are looking at one local file, building a project, sharing a demo, or inspecting a page already open in a browser.

Method Setup and refresh Linked files and projects Shareable URL Do edits save to your source?
Open an HTML file directly Minimal setup; reload manually after saving Works well for a simple self-contained page. A page that relies on server behavior or certain local requests may need a server instead. No Yes, when you edit and save the original file in your editor
VS Code Integrated Browser or Live Preview Preview within the editor; Live Preview supports an editor-oriented feedback loop Useful for working with project files and linked assets Not established as a sharing workflow by the cited VS Code documentation Save changes in your editor; a preview is not a substitute for saving source files
CodePen Live View Browser-based editor; preview updates as you edit Suited to snippets and demos rather than a complete local project Useful for sharing a CodePen Edits belong to the CodePen editor
Browser DevTools Open the inspector on a loaded page; changes appear immediately Works against the page as rendered, including pages not authored locally It does not create a separate shareable demo Not by default; Chrome Workspaces can connect changes to local source files

For one HTML file, start by opening it directly. If the page needs project-serving behavior, use an editor preview or local development server. If you only need to test a visual change on a page, use DevTools—but copy useful changes into your actual source or configure a persistence workflow.

Preview a local HTML file in any browser

1. Create and save the file

  1. Open a text editor or code editor.
  2. Enter a basic HTML document, for example:
    <!doctype html>
    <html lang="en">
    <head>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <title>My first preview</title>
    </head>
    <body>
      <h1>Hello, browser</h1>
      <p>This is my HTML preview.</p>
    </body>
    </html>
  3. Save it with an .html extension, such as index.html. Make sure the editor did not append .txt.

2. Open it in a browser

Use your file manager to open the saved file, or use the browser’s open-file command and select it. The address bar will typically show a local file:// address. MDN notes that when creating a site locally, you can often load the main HTML index file directly in a browser: MDN: Installing basic software.

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.
#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

3. Edit, save, and reload

Change the source in your editor, save the file, then reload the browser tab. This is the simplest feedback loop for a self-contained page. The browser displays the saved file, so unsaved editor changes will not appear.

Get a live preview while editing

VS Code Integrated Browser or Live Preview

In VS Code, right-click an HTML file in the editor or Explorer and choose Open in Integrated Browser to preview it inside the editor. VS Code’s documentation also describes the Live Preview extension as an option for previewing web pages. Available commands and extension behavior can vary by VS Code release, so check the current documentation if a menu item is missing: VS Code: HTML in Visual Studio Code and VS Code: Integrated Browser.

An integrated preview keeps the editor and browser view close together, which is convenient while adjusting markup and styles. Save your work in the source file; a preview is for viewing, not a replacement for maintaining your project files.

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

CodePen Live View for snippets and demos

For a small example that you want to experiment with or share, use the HTML, CSS, and JavaScript panels in CodePen. Its Live View updates the preview automatically as you edit: CodePen: Live View. This is a browser-based scratchpad, not a direct preview of files in your local project.

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

When to use a local server

Opening a file directly is not the same as serving a website. A plain HTML page with inline styles may work perfectly from file://, while a project using fetch requests, JavaScript modules, or server-side behavior may not. If a feature depends on a web server, run the project through an appropriate local development server or use a preview that serves the project. The exact setup depends on the tools and framework in use.

Inspect or change HTML in browser DevTools

DevTools is for examining the page that the browser has loaded, not simply for opening an HTML file. Right-click an element and choose the browser’s inspect command, or open developer tools from the browser menu. In Firefox, the relevant panel is called Inspector; in Chrome, Edge, and Safari, it is generally called Elements.

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.

The DOM inspector shows rendered HTML and CSS. You can select an element, edit its markup or styles, and see visual feedback immediately. MDN describes this live editing capability in its guide to browser developer tools: MDN: What are browser developer tools? Use it to answer questions such as which rule controls a margin or what content the browser actually rendered.

These are usually experiments against the live page. A refresh can discard them, and they do not automatically change the source file you originally wrote. Chrome’s Sources panel supports viewing files, editing CSS and JavaScript, and configuring a Workspace so changes can be saved to the local file system: Chrome DevTools: Sources panel. Use a Workspace when you specifically want DevTools edits connected to local files; otherwise, make the durable change in your editor.

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

Or skip the browser setup

If you need a screenshot rather than an interactive preview, ScreenshotNeo can return a website screenshot with one GET request. It is a screenshot API and MCP server for developers. For a public page, this cURL command saves a WebP image:

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

Replace YOUR_API_KEY with your API key and change the target URL as needed. See the ScreenshotNeo API documentation for request options and response details. Screenshots are not a substitute for an interactive browser preview when you need to click around or debug a page.

  • Cookie banners are accepted and removed before capture, along with supported newsletter popups and chat widgets; each cleanup step can be turned off.
  • Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed. Response headers report the page verdict and billing status.
  • An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents and MCP clients such as Claude and Cursor.
  • The Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 screenshots.

Sign up for ScreenshotNeo’s free plan to try 1,000 screenshots a month with no card.

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

Troubleshoot a missing or incorrect preview

The browser shows text instead of a page

Check that the file is saved with an .html extension and that your editor did not save it as index.html.txt. Reopen the actual HTML file after correcting its name.

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.
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.

CSS or JavaScript does not load

  • Check the href on the stylesheet link and the src on the script element.
  • Confirm the referenced files exist in the folders indicated by those relative paths. A path that works from one directory may fail if the HTML file is moved.
  • Reload after saving both the HTML and linked file. For runtime errors or failed resource requests, inspect the browser’s developer tools.

A feature fails from a file URL

If the page uses fetch requests, modules, or server-side behavior, it may need to be served rather than opened as a local file. Try a local development server or a project preview that serves the files. The right server depends on your project; a screenshot or DOM inspection tool will not fix a missing server requirement.

DevTools edits disappear after reload

That is expected for ordinary in-browser experiments: the rendered page changed, but the source file did not. Reapply the change in your editor, or configure a Chrome DevTools Workspace if you need edits saved to local files.

The preview does not update automatically

For a direct file preview, save the file and reload the browser manually. For an editor-based loop, open the HTML in VS Code’s Integrated Browser or use its Live Preview extension. In CodePen, use Live View to see editor changes update in the preview.

Pick a workflow that matches the job

  • One file, quick check: save as .html, open it directly, then save and reload as you edit.
  • Local project and tighter feedback: use VS Code’s Integrated Browser or Live Preview; use a local server when project behavior requires one.
  • Small shareable example: use CodePen Live View.
  • Inspect a rendered page or test a CSS change: use DevTools Inspector or Elements, then save lasting changes in source or connect a Chrome Workspace.
  • Capture a static image or PDF of a URL: use a screenshot service such as ScreenshotNeo rather than treating a screenshot as an interactive preview.

Frequently Asked Questions

Can I preview HTML without installing a development server?

Yes. For a self-contained page, save an .html file and open it directly in your browser. A server is only needed when the page’s behavior depends on being served over HTTP or on project-specific tooling.

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

Does editing HTML in DevTools change my original file?

Not by default. DevTools edits affect the rendered page; use your editor for persistent changes or configure Chrome DevTools Workspaces.

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.