הדף עדיין לא זמין בעברית, ולכן הוא מוצג באנגלית.

How do I open an HTML file on Windows, and why won't my AI-made page work?

Quick answer

Double-click an .html file and Windows opens it with the app set for .html files. If that's Notepad, right-click the file, choose Open with, and pick Edge or Chrome, or set one in Settings > Apps > Default apps. If the page stays blank, it may need files beside it that browsers block on a page opened from disk.

Get a link for my HTML file

Free plan: no credit card, 1 published page.

On this page

ChatGPT made you a quiz, or a teacher emailed a game made with Claude. You double-click the .html file on your Windows PC and get a wall of code in Notepad, a blank page, or buttons that do nothing. This guide shows how to open the file in a browser, how to make Windows do that every time, and what a browser blocks on a page that opens from your disk. On a Mac, see how to open an HTML file on a Mac. On a phone, see the iPhone or Android guide, and on a school laptop, the Chromebook guide.

Sending a file you made? The upload box at the top of this page turns it into a preview link without an account. That preview runs no scripts, so a quiz or game won't respond there. Click Keep this page — free, no card and sign up, and the page moves into your account, where its scripts run and you can publish it.

What happens when you double-click an .html file

Windows opens a file with the app set for its type, and the type comes from the end of the file's name. Microsoft's list of file name extensions gives htm, html as "Hypertext markup language page", and says an extension tells your computer which application can open the file. So a double-click on quiz.html opens whichever app Windows has for .html files. That can be a browser, such as Microsoft Edge or Google Chrome, or an editor, such as Notepad.

To see which app it is, open Settings, select Apps > Default apps, and type .html in the search bar. Select the result, and Microsoft's steps let you choose another app for that file type.

A browser opens the file from your disk. Its address starts with file:/// rather than https://, the scheme MDN, Mozilla's reference for web developers, describes for a local file. That address is why some pages stop working, as the section on file:// pages shows.

We didn't test these steps on a Windows PC. They come from Microsoft's and Google's help pages, read on October 25, 2026. The browser results below come from our test on a Mac on October 24, 2026.

Open an HTML file in a browser on Windows in 4 steps

These steps open the file in Microsoft Edge or Google Chrome, where its scripts run. Nothing is uploaded.

1. Check that the name ends in .html

If File Explorer doesn't show file name extensions, Microsoft's steps turn them on. In Windows 11, select View > Show > File name extensions. In Windows 10, select the File name extensions check box in the Show/hide group under View. A file that now reads quiz.html.txt ends in .txt, so Windows opens it as a text file. Rename it to quiz.html: Microsoft says a new extension changes nothing in the file but its name.

2. Right-click the file and choose Open with

In File Explorer, right-click the file, choose Open with, and pick Microsoft Edge or Google Chrome. If the browser you want isn't listed, open it and press Ctrl + O instead. Microsoft lists Ctrl + O in Edge as "Open a file from your computer in Edge", and Google lists it in Chrome as "Open a file from your computer in Chrome". Then choose the file.

3. Make a browser the app for .html files

Microsoft's steps for a file type: open Settings, select Apps > Default apps, type .html in the search bar, select the result, and choose Microsoft Edge or Google Chrome. Do the same for .htm. From then on, a double-click opens every .html file in that browser. If you make Chrome your default browser on Windows 11, Google's help says to review the list under "Set default file types or link types" so the change reaches the right file types.

4. If the page breaks, open it in the HTML viewer

Go to the free HTML viewer in Edge or Chrome and click Choose an .html file, or drag the file onto the page. Your browser reads the file, and it reaches Convika's servers only if you press Get a link by uploading this page. The page's scripts run in a frame walled off from convika.com. Files the page points to with tags, such as style.css or game.js in a <script src>, can't show there, and the viewer lists them under the page. If someone sent you the file and you weren't expecting it, ask the sender first, and turn off Run scripts before you choose it. The page then shows its HTML and CSS only.

If the code came to you as text in a chat or an email, you don't need a file. Choose Paste code in the viewer, paste it, and click Show the page. The viewer opens .html and .htm files up to 2 MB.

Why it opens in Notepad, or as code

  • Notepad is the app for .html files. An editor shows a file's code, which is its job. Use Open with for one file, or Default apps for all of them, as in steps 2 and 3.
  • The name really ends in .txt. Windows treats page.html.txt as a text file. With extensions hidden, it shows as page.html. Turn the extensions on and rename it, as in step 1.
  • The code came as text. A code block from ChatGPT, Claude, or Gemini isn't a file yet. Paste it into the viewer's Paste code, and there's nothing to save or rename.

What a browser blocks on a page opened from disk

MDN explains what changes for a page with a file:/// address: "Many browsers, including Firefox and Chrome, now treat all local files as having opaque origins (by default). As a result, loading a local file with included local resources will now result in CORS errors." Its guide to JavaScript modules says of file:// pages: "You need to do your testing through a server."

We built 8 small test pages and opened each from disk on a Mac on October 24, 2026, in Chrome 155. Chrome ran a script written inside the file and loaded Tailwind and three.js from the web. It also ran game.js loaded with a plain <script src="game.js">. It blocked game.js loaded with <script type="module">, a fetch() of data.json from the same folder, and a built app's /assets/index.js. Test builds of Firefox and WebKit blocked the same 3. We didn't run these pages on Windows or in Edge. The Mac guide has the full table, the console messages, and the browser versions.

So a game whose code sits in a module file shows its HTML and nothing else, and a quiz that loads its questions from a .json file gets no questions. To see the error, open the developer tools: Google lists Ctrl + Shift + J or F12 for Chrome on Windows, and Microsoft lists Ctrl + Shift + I or F12 for Edge.

3 ways around it:

  • Ask the AI for one file. Ask the chat that made the page: "Give me the whole page as one HTML file, with the CSS and JavaScript inside it and any data written into the script. Don't load other local files." Scripts from a CDN, such as Tailwind, can stay: they loaded on a page opened from disk in our Mac test.
  • Serve the folder from your PC. A developer can run a local server in the page's folder and open it from http://localhost. The Mac guide shows Python's http.server. We didn't test it on Windows.
  • Publish it. A page served from an https:// address doesn't have these limits, and everyone with the link opens it the same way. Fold any game.js or data.json into the page first, as Convika hosts one HTML file per page.

A download Edge warns about

Microsoft says SmartScreen in Edge checks your downloads against a list of reported malicious software sites and programs known to be unsafe. It also warns you if a download isn't on a list of well-known and popular downloads by Edge users. Microsoft's SmartScreen overview describes that check as deciding whether "a downloaded app or app installer is potentially malicious". We didn't test whether an .html download gets that warning.

A warning on a file you weren't expecting is a reason to delete it, not to open it. If you were expecting the file, check with the sender before you open it.

Ways to open it, compared

Way to open itWhat you doWhere the page runsModule scripts and data files beside itWho sees the page
Double-clickDouble-click it in File ExplorerThe app set for .html filesBlocked on a file:/// page (MDN; our Mac test of Chrome 155)Only you
Open withRight-click, Open with, pick a browserThe browser you pick, this timeBlocked, as aboveOnly you
Ctrl + OPress Ctrl + O in Edge or Chrome and choose the fileThat browserBlocked, as aboveOnly you
HTML viewer, Choose an .html fileChoose or drop the file on the viewer's pageA walled-off frame on the viewer's pageNot loaded; files named in tags are listed under the pageOnly you
HTML viewer, Paste codePaste the code and click Show the pageA walled-off frame on the viewer's pageNot loaded; files named in tags are listed under the pageOnly you
A link to a published pageClick the linkAny browser, from an https:// addressOne HTML file goes up, so fold them into the page firstEveryone with the link, on any phone or computer

School and work PCs that block local files

On a PC your school or employer manages, an administrator can turn off what these steps use. Chrome and Edge each have their own policies, set separately, so a file can open in one browser and not the other.

PolicyWhat it does, in the vendor's wordsIn ChromeIn Edge
AllowFileSelectionDialogsTurned off, "whenever users perform actions provoking a file selection dialog, such as importing bookmarks, uploading files, and saving links, a message appears instead" (Google)On Windows, Mac, and LinuxOn Windows and macOS: "a message is displayed instead" (Microsoft)
URLBlocklist"Setting the URLBlocklist policy stops web pages with prohibited URLs from loading" (Google)The URL format accepts the file scheme, and an entry of * blocks every schemeMicrosoft: "This policy doesn't work as expected with file://* wildcards."

With file selection dialogs off, Ctrl + O and the viewer's Choose an .html file can't open the file picker. The viewer's Paste code needs no file, but it works only if the PC can open convika.com. Don't try to get around your school's or company's settings: ask the IT team to open the file for you, or to allow it.

For IT staff: Google's Group Policy path is Policies > Administrative Templates > Google > Google Chrome, and Microsoft's is Administrative Templates > Microsoft Edge.

A file you send arrives as a file. On the other person's PC, it opens from their disk, with the same blocks, and any game.js or data.json beside it stays on yours. A link opens the page from an https:// address in any browser.

With Convika:

  1. Drop your file into the upload box at the top of this page, or paste the code. You get a preview link in seconds, without an account. It works for 3 minutes, with scripts and forms off.
  2. Click Keep this page — free, no card and sign up. The page moves into your account, and its scripts run in the dashboard preview.
  3. Click Publish page. Under Who can open this page?, choose Public and click Next. The first time, click Publish free.
  4. Copy the address under Live URL and paste it into the email or chat instead of the file.

On Free, the page is published as Public: anyone with the link can open it, and it may show up in search results and in Convika's gallery. To keep it out of both, choose Private link (Pro or pass) under Who can open this page? when you publish. Anyone with a private link can still open it.

To check the page on a phone first, How to open an HTML file on iPhone shows what a phone does with the file and the link. How to share an HTML file as a link compares other free hosts, and How to send an HTML file by email covers the attachment.

Frequently asked questions

How do I open an HTML file in Chrome on Windows 11?

Right-click the file in File Explorer, choose Open with, and pick Google Chrome. Or open Chrome, press Ctrl + O, which Google lists as "Open a file from your computer in Chrome", and choose the file. To make Chrome open every .html file, open Settings > Apps > Default apps, type .html, select the result, and choose Google Chrome.

Why does my HTML file open in Notepad?

Because Notepad is the app Windows has for .html files, or because the file's name really ends in .txt. To change the app, open Settings > Apps > Default apps, type .html, and pick a browser. To check the name, select View > Show > File name extensions in File Explorer on Windows 11, and rename page.html.txt to page.html.

How do I make Edge open .html files by default?

Open Settings > Apps > Default apps, type .html in the search bar, select the result, and choose Microsoft Edge. Do the same for .htm. To make Edge your default browser as well, Microsoft's steps are: under Set defaults for applications, select Microsoft Edge, then Set default.

Why is my HTML file blank when I double-click it?

Because the page needs something it can't load from your disk, or a script stopped with an error. MDN says Chrome and Firefox treat local files as having opaque origins, so a local file's local resources end in CORS errors. In our Mac test, Chrome 155 blocked a module script and a .json file from the page's folder. Press F12 to see the error, and ask the AI for one self-contained file.

Is it safe to open an HTML file I downloaded?

Not if you weren't expecting it. An HTML file is a web page, so it can run scripts and show forms. If you weren't expecting the file, ask the sender first. To look at one you're unsure of, open the HTML viewer, turn off Run scripts, then choose the file: you see its HTML and CSS only. Don't type a password into a page that came to you as a file.

Why does my HTML file work in Edge but not Chrome?

On a PC a school or employer manages, a policy set for one browser and not the other can cause it. Chrome and Edge each have their own policies, and the same one can behave differently: Google's URL blocklist format accepts file:// addresses, while Microsoft says Edge's URLBlocklist "doesn't work as expected with file://* wildcards." We didn't test Edge. Press F12 in each browser and compare the errors.

How do I see the code of an HTML file?

Right-click the file, choose Open with, and pick Notepad. In Chrome, Ctrl + U shows what Google calls the "non-editable HTML source code for the current page". In the HTML viewer, Edit the code under the page shows the code in a box you can change, without changing the file on your PC.

How do I send an HTML file so it works on another PC?

Send a link, not the file. On another PC, a file opens from that PC's disk, with the same blocks, and the files beside it stay on yours. Publish the page and send its address. On Convika, drop the file into the upload box at the top of this page, keep the page on the Free plan, and publish it.

Sources

Next step

How to password protect an HTML page without code, on your own domain

JavaScript passwords sit in the page code. Put an HTML page from ChatGPT or Claude behind a server-checked password on your own domain.

Related articles

More ways to send your page

Share this article

Send a link instead of the file

Upload the HTML file once and publish it. The person you send it to clicks the link and the page runs in their browser, on Windows or any other device.

Get a link for my HTML file

Free plan: no credit card, 1 published page.