Stylus to SASS Converter
Paste Stylus source and get indented SASS — variables, mixins, and includes are rewritten in SASS conventions.
Last updated: May 25, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is Stylus to SASS Converter?
Stylus and indented SASS both prefer whitespace-based blocks, so a Stylus stylesheet often looks superficially similar to a SASS one. The differences are in punctuation and sigils: SASS requires `$` before variable names and uses `=` and `+` shorthand for mixin definitions and includes. Stylus declares variables with `name = value`, uses bare identifiers for variable references, and treats mixin definitions and calls as plain identifiers followed by parentheses.
This converter first normalises Stylus into SCSS-style source so it can pick up variable assignments and mixin definitions reliably, then runs the SCSS-to-SASS pass, which strips braces and semicolons, restores indentation-based nesting, and replaces `@mixin`/`@include` with SASS `=name`/`+name` shorthand.
It is well suited for migrating a Stylus project to indented SASS, integrating Stylus snippets into an existing SASS codebase, or comparing how the two indentation-based syntaxes line up. Stylus-only features such as transparent mixins, control flow, and built-in helpers are not translated.
How to Use Stylus to SASS Converter
Paste Stylus code into the input panel.
The SASS output appears instantly on the right.
Inspect the rewritten variables, mixins, and nested rules.
Copy the SASS or download it as a .sass file.
Rework anything that relied on Stylus-only built-ins.
Common Use Cases
- Migrate a Stylus stylesheet into a SASS-based project.
- Integrate a Stylus component into a SASS design system.
- Compare equivalent variable and mixin syntax between Stylus and SASS.
- Generate a SASS baseline from a Stylus prototype before adding SASS helpers.
- Convert documentation snippets from Stylus to SASS for an article.
Example Input and Output
Convert Stylus assignments and a mixin into SASS shorthand.
primary = #0f766e
flex-center()
display flex
.hero
flex-center()
color primary$primary: #0f766e
=flex-center
display: flex
.hero
+flex-center()
color: $primaryPrivacy
All conversion happens locally in your browser. No Stylus or SASS is transmitted to any server.
Stylus-only features
Transparent mixins, control flow, and Stylus built-in functions are not translated. Review and rework these manually after conversion.
Frequently Asked Questions
What is the difference between SASS and SCSS?
SCSS uses curly braces and semicolons. SASS is the older indentation-based syntax with no braces, plus = and + shorthand for mixins. This tool targets the indented SASS flavour.
How are bare identifiers handled?
Identifiers that match an earlier `name = value` assignment are prefixed with `$` in the output. Other identifiers (keyword values, units) are left alone.
Are nested selectors preserved?
Yes. Nested selectors and & parent references work the same way in Stylus and SASS, so they pass through after the brace and shorthand conversion.
Does my Stylus get uploaded?
No. Conversion runs entirely in your browser — nothing is sent to a server.
Related Tools
Stylus to CSS Converter
Convert Stylus code to plain CSS. Adds colons, semicolons, and braces; resolves variable assignments; and flattens nested selectors directly in your browser.
Stylus to SCSS Converter
Convert Stylus code to SCSS. Adds braces and semicolons, rewrites name = value assignments as $variables, and maps Stylus mixin syntax to @mixin/@include.
Stylus to LESS Converter
Convert Stylus code to LESS. Adds braces and semicolons, rewrites name = value assignments as @variables, and converts Stylus mixin syntax to LESS .mixin() form.
SASS to Stylus Converter
Convert indented SASS syntax to Stylus. Drops semicolons, rewrites $variables as Stylus assignments, and maps =mixin/+include shorthand to Stylus mixin syntax.
SASS to SCSS Converter
Convert SASS indented syntax to SCSS brace syntax. Adds curly braces and semicolons, converts = and + shorthand to @mixin and @include.
SCSS to SASS Converter
Convert SCSS brace syntax to SASS indented syntax. Removes braces and semicolons, converts @mixin/@include to = and + shorthand.

