HTML · Guide

How to open an HTML file in your browser

Open a local HTML file in Chrome or another browser, troubleshoot files that will not render, and share a page as a link.

An HTML file is a web page saved on your device. You can usually open it directly in a browser, without installing a special viewer or uploading the file. The right method depends on whether you only want to read it, need to inspect its code, or want another person to open the same page.

Open an HTML file locally

Double-click the file or open it from Chrome

Find the .html file in Finder or File Explorer and double-click it. Your operating system opens it with the app associated with HTML files. If that app is a text editor, right-click the file, choose Open With, and select your browser as the HTML file opener. You can also open Chrome, press Ctrl+O on Windows or Linux, or Command+O on macOS, then select the file. Dragging the file into a browser window works too.

Look at the address bar after the page opens. A local page normally has an address beginning with file:/// followed by its path. This tells you the browser is reading a copy stored on your device. You do not need a web server for a standalone document that only uses its own embedded styles and scripts.

Use a code editor when you need to inspect it

A browser shows the rendered page, while a code editor shows the HTML source. If you received a file and want to understand its contents, right-click it and choose a text editor, or open it from your editor's file menu. Save an edited copy with the .html extension and reopen that copy to see the result.

An HTML file can refer to separate CSS, JavaScript, image, or font files. Relative references expect those files to stay in the folder structure used by the page. If you move only the HTML document, the page may still open while its styling or images are missing. Keep the companion files beside it, or preserve their original subfolders.

Troubleshoot an HTML file that will not open

Check the real extension and file contents

A common cause is a file that looks like page.html but is actually page.html.txt. Turn on filename extensions in your file manager and inspect the complete name. If the file ends in .txt, rename a copy to .html only when its contents are HTML markup. Opening it in a text editor will help you distinguish markup from an unrelated text document.

Check that the file is not empty and compare its size with the copy you expected to receive. A download that stopped early can leave an incomplete document. Browsers can often display imperfect HTML, but missing content, broken tags, or a truncated script may explain a blank or partly rendered page. If possible, download or copy the file again from its source.

If the browser shows markup as plain text, open the same file in your editor and look for HTML tags such as <html> or <body>. A page exported as a text document or saved with escaped tags may need to be exported again as HTML. If the text is readable but characters appear garbled, open the source in your editor and save a copy using UTF-8.

Understand local browser security limits

The address file:/// is useful for reading a simple document, but browsers isolate local files for security. A page may not be allowed to fetch neighboring files, load some modules, or send requests that work when the same page is served from a web origin. JavaScript in the document can run, but access to local resources is restricted and browser-specific.

If the page relies on several files or browser features that require an origin, opening the HTML file alone may not reproduce the intended result. Keep the bundle together and use an appropriate local development server when you are developing it. For a quick visual review, an isolated online preview can also show the rendered document without changing the original file on disk.

Share an HTML file as a link

Preview first, then publish the page

Sending the original attachment asks each recipient to download it and choose how to open it. A published link opens in their browser instead. With HTMLURL, upload one .html file or paste the source into the workbench, inspect the rendered preview, and publish when it looks right. A page is served from its own htmlurl.page subdomain, separate from the editor and account site.

Anonymous publishing does not require an account. A single file can be up to 5 MB, and a bundle can be up to 20 MB. Anonymous retention can be selected up to 90 days. Published pages carry a noindex directive so search engines are asked not to index them. A password can restrict access, and the edit token lets you update or roll back a published page. Keep that token private because it controls changes to the page.

Choose the right way to share

For a document that only you need to read, opening it locally avoids sending it anywhere. For feedback from someone else, a published link avoids the friction of an attachment and lets you check the browser rendering first. If the page uses supporting assets, publish the folder as a ZIP bundle so its relative paths remain available. Share a password separately from a protected link.

Before sending the URL, open it in a separate browser tab and confirm the page loads as expected. If you later revise the HTML, use the edit token to publish an update at the same address or restore an earlier version. The local file remains your source copy, so keep it alongside any assets you may need for another revision.

To preview a file from your device, use the HTML file viewer.

To paste source and check the rendering, open an HTML file online.