TROUBLESHOOTING

How to open an HTML file on Windows (in Edge, Chrome or any browser)

You saved an .html file, or an AI tool gave you one, and Windows opens it as code or not at all. The ways to open it in a browser on Windows 10 and 11, the fixes for common snags, and how to send it to someone else.

4 min read·

On Windows, double-clicking an .html file opens it in the app set as its default. On a fresh PC that is Microsoft Edge. Installing a code editor or another browser can change it, and then the file opens as code. Opening an HTML file only needs a browser; no extra software is required.

Open the file in a browser

The address bar then shows a file:///C:/ path. That is normal for a file on your own disk.

  • ✓In File Explorer, right-click the file, choose Open with, and pick Microsoft Edge, Google Chrome or Firefox. On Windows 11 you may need Show more options first.
  • ✓Drag the file from File Explorer onto an open browser window or tab.
  • ✓In the browser, press Ctrl+O and pick the .html file. In Chrome, Ctrl+O works even though the menu does not list it.

Make a browser the default for .html files

  • ✓Windows 11: open Settings > Apps > Default apps, type .html in the search box at the top, click the current app and choose the browser.
  • ✓Windows 10: open Settings > Apps > Default apps, click Choose default apps by file type, find .html and pick the browser.
  • ✓Or right-click the file, choose Open with > Choose another app, pick the browser and tick Always use this app.

Common snags

  • ✓The file is really called page.html.txt. File Explorer hides extensions by default. Turn them on (Windows 11: View > Show > File name extensions; Windows 10: the View tab, tick File name extensions), then rename the file and remove .txt.
  • ✓You saved code from Notepad and it opens as text. In the Save As box, set Save as type to All files and type the name ending in .html.
  • ✓Images, styles or data are missing. The page refers to files that are not beside it, or the file was opened straight from a zip. Extract the zip first (right-click > Extract All), keep the folder together, or make the file self-contained.
  • ✓A chart or table stays empty. Edge and Chrome block pages opened from file:/// from loading JSON or CSV files with fetch(). Serving the page from a web address fixes it; loading a JSON file in a shared page covers the details.
  • ✓The file opened from an email attachment and looks broken. Mail apps open attachments from a temporary folder without the files beside them. Save the attachment to a folder first, then open it.

Send it to someone else as a link

Opening the file on your PC only helps you. Attach it to an email or a chat and the other person often gets a download, a preview without scripts, or a blocked attachment. A hosted page opens at an https:// address on any PC, Mac or phone.

With FileShare Pro: upload the .html file from the dashboard, copy the link and send that. The person opening it needs no account.

If an AI tool made the file

Claude artifacts and ChatGPT canvases are usually downloaded as a single .html file. See downloading a Claude artifact and sharing a ChatGPT canvas. Sign up free to share your first page.

Related: opening an HTML file in Chrome, on a Mac, on iPhone and editing an HTML file.

Frequently asked

How do I open an HTML file on Windows?

Right-click the file in File Explorer, choose Open with, and pick Edge, Chrome or Firefox. Or press Ctrl+O in the browser and choose the file.

Why does my HTML file open in Notepad or VS Code instead of a browser?

Another app has become the default for .html files. In Settings > Apps > Default apps, set .html to your browser, or use Open with > Choose another app and tick Always use this app.

Why does the page look broken when I open it on my PC?

It loads from file:/// and cannot reach images, styles or data files that are not beside it, and browsers block some data loading from local files. Extract any zip, keep the folder together, or host the page at a web address.

How do I share an HTML file from Windows?

Upload it to a host and send the link. Attachments often arrive as downloads or previews without scripts; a link opens as a working page on any device.

Got a page to share?

Drop the file, copy the link — live in seconds, free plan included.

Start sharing free