.HTM

HTM File

HTML Web Page (8.3 "htm" spelling of html)
Ask a question
QUICK ANSWER

A .htm file is an HTML web page, exactly the same as an .html file. The difference is purely historical - old DOS and Windows systems only allowed three-character extensions, so pages were saved as .htm instead of .html. To view one, double-click it and it opens in your browser. To edit the code, open it in a text editor.

Developer: W3C / WHATWG (HTML standard) Category: Web Files Open standard MIME: text/html
OPENS ON Windows macOS Linux Web

On this page

19k+ extensions indexed
Last reviewed Aug 31, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the HTM file format?

An .htm file contains markup code in Hypertext Markup Language format - it is functionally identical to .html, differing only in the three-character extension. This is a standard document format used for creating web pages and websites. .htm stores markup code used to display text, images, and other media, and remains widely used among website designers and developers.

HTM vs. HTML

Despite their apparent difference, .htm and .html extensions are identical in regard to stored data and are used for the same purposes. The .html extension is more common today, while .htm originated as a compatibility measure for legacy operating systems - DOS, Windows 3.x and OS/2 - which enforced the 8.3 file naming convention (up to 8-character filenames with 3-character extensions). An HTML document can be saved using either extension with no difference in how browsers interpret it.

HTM file capabilities

.htm files store content in plain-text markup format, which allows users to open and modify them with any standard text editor. .htm files can hold a complete web page structure. Beyond text content, they can embed or reference .css stylesheets, JavaScript, image files, audio files, video files, and links to scripts written in other languages.

Security & safety

RISK: LOW

An .htm file is plain text and is safe to open in a text editor. The caution is that HTML pages can embed JavaScript, which runs when you open the file in a browser - a malicious local .htm could attempt phishing (a fake login page) or run scripts. Treat .htm files from e-mail or untrusted downloads like any web page: don't enter credentials into a page you didn't expect, and open suspicious files in a text editor first to inspect them rather than letting a browser execute them.

Format details

in a nutshell
FULL NAMEHTML Web Page (8.3 "htm" spelling of html)
DEVELOPERW3C / WHATWG (HTML standard)since 1991 (HTML); .htm dates from the 8.3-filename DOS/Windows era
CATEGORYWeb Files
MIME TYPEtext/html
TYPEPlain-text markup (HTML)
STANDARDOpen · royalty-free

Programs that open HTM files

Windows5 apps
Mozilla Firefox Free Double-click or drag the file into Firefox to render it; Ctrl+U shows the source.
Windows Notepad Built-in Right-click > Open with > Notepad to read/edit the raw HTML text.
Notepad Open-source Right-click > Edit, or open in Notepad++ to view and edit the HTML source with syntax highlighting.
Microsoft Edge / Google Chrome Built-in Double-click the .htm to view it rendered. Edge is the built-in default browser on Windows 11.
Visual Studio Code Free Open the .htm to edit; use the built-in Live Preview / Live Server extension to see changes instantly.
macOS3 apps
TextEdit Built-in Open as plain text (Format > Make Plain Text) to edit the raw HTML.
Safari Built-in Double-click to render the page in Safari, the built-in macOS browser.
Visual Studio Code Free Open the file to edit the HTML source; preview with the Live Server extension.
Linux2 apps
Firefox / Chromium Open-source Double-click to render the page in your browser.
gedit / any text editor Open-source Open the file to view and edit the HTML source.
Web1 app
CodePen / JSFiddle Free Paste the HTML to render and tweak it in the browser - handy for testing a snippet without local files.

Technical details

deep spec
MIME typetext/html
File encodingPlain text; UTF-8 most common, also UTF-16 and ISO 8859-1 supported
Binary signatureNone - no fixed magic bytes; files are identified by extension or content pattern
Typical file start<!DOCTYPE html> declaration or <html tag; may be preceded by a UTF-8 BOM (EF BB BF)
Extension origin8.3 filename convention enforced by DOS, Windows 3.x and OS/2 (maximum 3-character extension)
Relationship to .htmlFunctionally identical - browsers, web servers and HTTP stacks treat .htm and .html the same way
Governing standardWHATWG HTML Living Standard
Markup modelHierarchical element tree of opening/closing tags, attributes, text nodes, and HTML comments
Embeddable resource typesInline text, inline SVG; external references to images, audio, video, CSS stylesheets, and JavaScript
Scripting supportJavaScript via <script> elements or linked .js files; no other scripting language runs natively
Character set declaration<meta charset="UTF-8"> inside the <head> element
HTTP Content-Typetext/html; charset=UTF-8
Static site generator outputCommon output format for generators such as Jekyll, Hugo, and Eleventy
Source readabilityFully human-readable plain text; diff-friendly and editable in any text editor without special tools
Released1991 (HTML); .htm dates from the 8.3-filename DOS/Windows era
Open standardYes · royalty-free
Specificationhtml.spec.whatwg.org

HTM conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with HTM files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about HTM files.

Frequently asked questions

What is the difference between .htm and .html?
None. They are the same HTML format. '.htm' is the old three-letter spelling from DOS/Windows (which limited extensions to three characters); '.html' is the four-letter form. Browsers and servers treat them identically.
How do I open a .htm file?
To view it, double-click - it opens in your default web browser (Edge, Chrome, Firefox, Safari). To edit the code, right-click and open it with a text editor like Notepad, Notepad++ or VS Code.
How do I convert a .htm to .html?
Just rename the file's extension from .htm to .html. The content doesn't change at all - it's the same format under both names.
How do I edit a .htm file?
Open it in a code editor - Notepad++ or VS Code (free) give syntax highlighting and live preview. Plain Notepad/TextEdit also work for quick edits. Save and reopen in a browser to see the result.
How do I convert a .htm web page to PDF?
Open the .htm in a browser, press Ctrl+P (Cmd+P on Mac), and choose 'Save as PDF' as the destination. This saves the rendered page as a PDF.
Why did my saved web page open as .htm?
Some browsers and Microsoft tools (FrontPage, Office 'Save as Web Page') default to the .htm extension. It is a normal HTML file - open it like any other web page.

References

1MDN Web Docs - HTML basicsdeveloper.mozilla.org
2MDN - Introduction to HTMLdeveloper.mozilla.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.MDMarkdown Document
4.BINCD/DVD Disc Image (BIN/CUE)
5.PARTPartial Download File
6.BCBitComet Incomplete Download File
7.EXEWindows Executable (Portable Executable)
8.NOMEDIAAndroid No-Media Marker File
9.AVIFAV1 Image File Format (AVIF)
10.RPMSGRestricted Permission Message

Related extensions

.CRDOWNLOADChrome Partial Download File
.JNLPJava Network Launch Protocol file
.WEBARCHIVESafari Web Archive
.PARTPartial Download File
.DOWNLOADPartial / Incomplete Download File
.ASPXActive Server Page Extended (ASP.NET Web Form)

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z