What is a .sass file?
Syntactically Awesome Style Sheets · Code and data · Hampton Catlin / Sass team · 2006
A .sass file is Sass source in the original indented syntax. Like SCSS it extends CSS with variables and nesting, but it drops braces and semicolons in favour of indentation.
What is a .sass file used for?
The indented .sass syntax is terser than SCSS: whitespace defines structure instead of braces. It is the older of the two Sass syntaxes and is less common today, but works identically once compiled.
A Sass compiler turns .sass into standard CSS. The files are plain text and open in any editor.
What opens a .sass file?
The .sass format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list.
Windows
- VS Code
- WebStorm
- any text editor
macOS
- VS Code
- WebStorm
- any text editor
Linux
- VS Code
- vim
- any text editor
Open a .sass file step by step
- Confirm the file really is a .sass. Drop it into the WhatFileType identifier, which reads its signature in your browser without uploading anything.
- On Windows, open it with VS Code or WebStorm.
- On Mac, use VS Code or WebStorm.
- On Linux, try VS Code or vim.
- Still stuck? Convert the .sass to css, which opens more widely.
Why can't I open my .sass file?
Almost always because no installed app understands Sass. Install one of the apps above, or convert the file to a format your existing software already reads. If double-clicking opens the wrong program instead of nothing at all, the file association is set to the wrong app rather than the file being broken.
The other possibility is that the file is not really a .sass at all. Drop it into the file identifier to check it by its bytes instead of its name. Nothing is uploaded.
How to convert a .sass file
You can convert a .sass file to css, scss using a conversion tool or the export menu of an app that opens it.
Sass has no fixed magic number, so there is no signature table on this page. Its bytes alone do not prove the format: identification relies on the extension, the structure of the content and the program that created it. The magic-numbers reference lists the formats that do carry one.
Frequently asked questions
What is a .sass file?
A .sass file is Sass source in the original indented syntax. Like SCSS it extends CSS with variables and nesting, but it drops braces and semicolons in favour of indentation.
Should I use .sass or .scss?
Most projects now use .scss because its CSS-like braces are familiar. The indented .sass syntax is equivalent but less common.
How do I open a .sass file?
Any text editor shows it. Watch the indentation, since in the .sass syntax it defines structure.
Can I convert .sass to .scss?
Yes. The Sass tools include a converter (sass-convert) that translates between the indented and bracketed syntaxes.
Related formats
Sources
Details on this page were checked against authoritative references. How sources are ranked and what is deliberately left out is set out in the methodology.