The simplest way to open an HTM file
An HTM file is a webpage saved on your computer instead of on the internet. To open it, double-click the file and your default web browser will load it — the same browser you use to visit websites. That's usually all you need to do.
If double-clicking doesn't work, or if you want to open the file in a different browser, right-click the HTM file and select "Open with" (on Windows) or "Open with" (on Mac). A list of browsers on your computer will appear. Pick the one you want to use.
HTM and HTML files are identical — HTM is just an older three-letter filename extension, while HTML uses four letters. Your browser treats them the same way.
Key Takeaways
- Double-clicking an HTM file opens it in your default web browser without any extra steps.
- Right-click and select "Open with" to choose a different browser if you have more than one installed.
- HTM files are webpages stored locally on your computer, not downloaded from the internet each time you open them.
- You can drag an HTM file directly into a browser window if double-clicking doesn't work on your system.
- Web developers use HTM files to test and preview websites before uploading them to a live server.
Opening HTM files on Windows
On Windows, locate the HTM file in File Explorer. Double-click it, and it will open in whichever browser is set as your default — usually Microsoft Edge, Chrome, or Firefox depending on what you installed most recently.
If you want to use a different browser, right-click the HTM file and hover over "Open with". A submenu will show all the browsers installed on your computer. Click the one you want. If you don't see the browser you're looking for, select "Choose another app" at the bottom of the menu, and Windows will show you every program capable of opening the file.
You can also drag the HTM file directly into an open browser window. This works even if the browser is already displaying a different webpage — the HTM file will load in a new tab.
Opening HTM files on Mac
On Mac, find the HTM file in Finder. Double-click it to open it in your default browser, which is usually Safari unless you've changed your settings.
To open it in a different browser, right-click (or Control-click) the HTM file and select "Open with" from the menu. A list of browsers will appear. Choose the one you want to use. If you want to change your default browser permanently, go to System Settings, click "General," then "Default web browser," and select a different option.
Like Windows, you can also drag the HTM file into an open browser window to load it when ready.
Why HTM files don't load images or links sometimes
An HTM file is just text that tells your browser how to display a webpage. If the file references images, stylesheets, or other files stored in separate folders, those files need to be in the right location for the browser to find them. If you move the HTM file to a different folder without moving the related files, the images and links may break.
When a web developer saves a webpage for offline use, they usually save the entire folder structure — the HTM file plus all the image and stylesheet folders together. If you only have the HTM file by itself, some parts of the page may not display correctly.
To check what files are missing, open the HTM file in your browser, then right-click anywhere on the page and select "Inspect" (in Chrome or Firefox) or "Inspect Element" (in Safari). Look for red error messages in the console that show which files the browser couldn't find.
Opening HTM files in a text editor instead of a browser
If you want to read or edit the code inside an HTM file, you can open it in a text editor instead of a browser. Right-click the HTM file and select "Open with," then choose Notepad (Windows), TextEdit (Mac), or any code editor like Visual Studio Code.
This shows you the HTML code that makes up the webpage — the tags, text, and links written out in plain text. Web developers use this view to find bugs, make changes, or understand how a page is structured. If you're just trying to view the webpage as it's meant to look, open it in a browser instead.
Sending HTM files to other people
HTM files are portable — you can email them or copy them to a USB drive, and they'll open the same way on someone else's computer. Just remember that if the file references images or other files stored in separate folders, you need to send those files too, or the recipient will see broken images.
The easiest way to share a complete webpage is to send the entire folder that contains the HTM file and all its related files. If you're only sending a single HTM file, let the recipient know that some images or styling might not display if the supporting files are missing.
Frequently Asked Questions
What's the difference between HTM and HTML?
HTM and HTML are the same file type. HTM uses a three-letter extension (from the days when older operating systems limited filenames to eight characters), while HTML uses four letters. Modern systems use HTML, but browsers treat both identically.
Can I edit an HTM file and save the changes?
Yes. Open the HTM file in a text editor, make your changes to the code, and save it. The next time you open the file in a browser, you'll see the updated version. Be careful to save it as an HTM or HTML file, not as plain text.
Why does my HTM file open in Notepad instead of my browser?
Your computer is set to open HTM files with Notepad by default. Right-click the HTM file, select "Open with," choose your browser, and check the box that says "Always use this app to open HTM files." This will change the default for all future HTM files.
Can I open an HTM file if I'm not connected to the internet?
Yes. HTM files are stored on your computer, so they don't need an internet connection to open. However, if the page contains links to websites or embedded content from the internet, those links won't work without a connection.