.haml File — HTML Abstraction Markup Language
text/x-haml
Drop any file to identify its extension and type — runs entirely in your browser
Drop a .haml file here or click to choose
Or drop any file to identify its extension
text/x-hamlQuick Facts
| Extension | .haml |
| Full Name | HTML Abstraction Markup Language |
| MIME Type | text/x-haml |
| Category | Web |
| Type | Text-based (human-readable) |
| Typical Size | 1 KB – 15 KB |
| First Appeared | 2006 |
What Is a .haml File?
HAML (HTML Abstraction Markup Language) is a template language that uses whitespace-indented syntax to generate HTML without closing tags or angle brackets. HAML uses % for element names (%div, %p, %span), . for classes, # for IDs, and indentation for nesting — producing cleaner, more readable template code than raw HTML or ERB. HAML was created in 2006 for Ruby on Rails applications and integrates deeply with the Rails ecosystem through the haml gem. A HAML template like "%h1.title Hello" compiles to "<h1 class='title'>Hello</h1>". HAML supports Ruby expression interpolation (= for output, - for execution), filters for embedding other languages (Markdown, CoffeeScript, Sass), and multiline content. The format enforces consistent indentation and clean markup structure. While HAML's adoption has been smaller than ERB (which is more familiar to HTML developers), it has a dedicated following among developers who value its conciseness and enforced structure. HAML implementations exist for Ruby, Python, PHP, JavaScript, and other languages. The format's influence is visible in other whitespace-significant template languages like Slim, Pug, and Emmet abbreviations.
How to Open .haml Files
Related File Extensions
More Web File Extensions
Other web formats you might encounter
Browse File Extensions by Category
Explore our reference of 259 file extensions with details, programs, and related formats.