HTM and HTML are the same format
Both extensions mean HyperText Markup Language — the code every web page is written in. Inside, an .htm file and an .html file are identical: headings, paragraphs, tables, links and references to images and styles. Any web browser opens either one in the same way.
The difference is historical. Early versions of Windows, and the DOS system underneath them, only allowed three characters after the dot in a file name. Web pages saved on those systems became .htm. Modern systems allow longer extensions, so .html became the usual spelling, but plenty of software still writes the short form.
Because they are the same format, you can rename one to the other without changing anything. That is rarely necessary, though — the only reason to do it is a website upload form or old program that accepts one spelling and not the other.
Where HTM files come from
Most HTM files people come across today were not written by hand. They are produced by other software saving content as a web page, which is a convenient way to keep formatting, tables and images in a form any computer can display.
| Source | What you usually get |
|---|---|
| Word “Save as Web Page” | An .htm file plus a folder of images |
| Saved or exported emails | One .htm file per message |
| Legacy reporting and accounting systems | Reports exported as .htm for viewing |
| Browser “Save page as” | The page plus a folder of supporting files |
| Help files and old documentation | Many linked .htm pages in folders |
Knowing the source tells you what to expect. A report from an old accounting system is usually self-contained text and tables. A Word document or a saved web page usually depends on a companion folder for its pictures, which matters as soon as you move, email or convert the file.
How to open an HTM file
Double-click it. On Windows, macOS and most Linux systems, HTM files open in your default web browser, which displays the page just as a website would. If it opens in something else, right-click the file and choose your browser from the open-with options.
To see or change the code itself, open it in a text editor instead — Notepad on Windows or TextEdit on a Mac, set to plain text — or paste it into HTML Editor, which shows the code and a live preview side by side. That is useful when you need to correct a heading, remove a section or fix a broken image path before converting the file.
On a phone, save the file to the Files app or your Downloads folder and open it from there; it will display in the browser. Phones handle a single self-contained HTM file well, but pages that depend on a folder of images often lose their pictures on a phone, for the reason explained next.
Fix missing images and broken layouts
Many HTM files do not contain their images. Instead, they point to pictures stored in a folder saved alongside them, typically named after the file with _files on the end — for example report.htm and report_files. Move the HTM file without that folder, or email it on its own, and the page opens with empty boxes where the images should be.
The fix is to keep the two together. Put the HTM file and its companion folder in the same place, with the folder name unchanged, and the images return. If you need to send the page to someone, put both into one folder and zip that folder so they travel together — Create ZIP keeps the folder structure intact.
If the layout looks plain or broken even with the folder present, the page may rely on stylesheets or fonts from a website that no longer exists. You cannot restore those, but the text and tables are still there. Converting the page to PDF at that point captures what you can see, which is often all you need from an archived report.
Convert an HTM file to PDF
A PDF is easier to share, print and archive than an HTM file: it keeps its layout on every device, includes its images inside the file, and opens without a browser. Open HTM to PDF, add the file, choose A4 or US Letter, portrait or landscape and a margin, then convert.
The tool prepares the page in your browser and opens the print dialog. Choose “Save as PDF” as the destination and save the file. Nothing is uploaded — useful for saved emails and internal reports — and long documents are split across pages automatically. The tool waits for images and fonts to load first, so keep the companion folder in place if the page has one.
If the file is a modern .html page or you have the code rather than a file, HTML to PDF does the same job and accepts pasted code. The HTML to PDF guide covers keeping styling intact during conversion.
Be careful with HTM email attachments
Because an HTM file is a web page that runs in your browser, it is a common way to deliver fake sign-in pages. A message claims you have an invoice, a voicemail or a shared document, and the attachment opens a convincing copy of a bank or email login page. Anything you type is sent to the attacker.
Open HTM attachments only when you were expecting them from someone you know. Never enter a password, card number or verification code into a page that opened from an attachment rather than from a website address you typed or trust. If a message pressures you to “sign in to view the document”, treat that as a warning sign.
When an HTM file is genuine — an exported report from your own system, say — converting it to PDF before passing it on is a good habit. A PDF cannot run scripts in the way a web page can, it is far less likely to be blocked by email filters, and recipients can open it without wondering whether it is safe.
Open HTM to PDFTurn a saved .htm page into a PDF in your browser — nothing uploaded.
Open HTM to PDF →Frequently asked questions
Is an HTM file the same as an HTML file?
Yes. Both contain the same web-page code. The shorter .htm spelling dates from older systems that only allowed three-letter file extensions.
Why are the images missing when I open an HTM file?
The images usually live in a companion folder saved next to the file, often ending in _files. If the HTM file was moved or emailed without that folder, the page cannot find its pictures.
Is it safe to open an HTM file from an email?
Treat an unexpected one with caution. HTM attachments are a common way to deliver fake sign-in pages. Only open files you were expecting from senders you trust, and never enter a password into one.