SCSS to Stylus Converter

Stylus is not a smaller language than Sass, it is a looser one. Paste SCSS below and the workbench keeps every mixin, loop, and extend that Stylus already has a word for, then tells you which two or three lines still need a human decision.

Load
.scss
Stylus output.styl

Both punctuation styles compile to the same Stylus AST. Bracketed reads closer to the SCSS you pasted. Bare is what most Stylus style guides ask for.

Paste SCSS above and Stylus builds as you type.

0Variable tokens
0Mixins and functions
0Lines flagged

Notes

Nothing to check yet.

Stylus is Sass's sibling, not its downgrade

Every other direction on this site turns a converter into a shrinkage report. Send SCSS to LESS and half the article is about the constructs LESS never grew. Stylus skips most of that problem. It has loops, conditionals, a hash type, and its own spelling for !default. The real story here is notation, not loss. Stylus made almost everything optional, punctuation included, so the same file can look like CSS with the sigils removed or like Python with curly braces gone entirely.

Read the notes panel before you trust the output. The workbench rewrites syntax it recognizes and leaves anything shaped like a Sass map exactly as written, colon and parentheses intact, because Stylus hashes use curly braces and guessing the rename would be worse than flagging it.

What the same construct looks like in each language

ConstructSCSSStylus
Variable$radius: 8px;radius = 8px
Variable with fallback$radius: 8px !default;radius ?= 8px
Mixin definition@mixin stack($gap: 12px) { }stack(gap = 12px)
Mixin call@include stack(16px);stack(16px)
Function@function tone($k) { @return map-get($t, $k); }tone(k) return t[k]
Condition@if $mode == dark { }if mode == dark
Loop over a list@each $c in $list { }for c in list
Loop over a map@each $k, $v in $map { }for k, v in map
Extend@extend .card;@extend .card
Interpolation.tone-#{$name}.tone-{name}

Two files, same rules

Stylus never forces one punctuation style. The compiler reads bracketed input identical to CSS and bare input with nothing but indentation, and a single file can even mix the two. The toggle above renders both from the same conversion pass, because a team standardised on Bootstrap-flavoured Stylus wants the left version and a team that picked Stylus specifically to avoid punctuation wants the right one.

Bracketedreads like CSS
brand = #c6538c
radius ?= 8px
.card {border-radius: radius;color: brand;&:hover {color: darken(brand, 10%);}}
Bareindentation only
brand = #c6538c
radius ?= 8px
.card
border-radius: radius
color: brand
&:hover
color: darken(brand, 10%)

Where the dollar sign actually goes

SCSS marks a variable at both ends, the $ on declaration and every use after it. Stylus needs neither. brand-pink = #c6538c declares it, color: brand-pink reads it, and the compiler tells variables from property names by position, not punctuation. The workbench strips every $ it finds, which is safe because Stylus reserves no other meaning for a bare identifier that happens to share a name with a color keyword. Custom properties are untouched on purpose. --brand on :root already runs at the browser, so a Stylus port of a file that bridges $brand into --brand for runtime theming keeps the double dash exactly as written.

Where Stylus already had the answer

Three Sass ideas that do not survive a LESS port land in Stylus with a native spelling, just a different one.

Where a human still has to look

A pass you should still read

This is a syntax rewrite, not a compiler. It runs entirely in this tab, so nothing you paste reaches a server, and closing the page clears both panes. Four limits are worth knowing before you commit the result.

Who is still choosing Stylus

Stylus peaked alongside Jade and the early Express view-engine stack, and most of the requests for this converter now come from maintaining that era rather than starting it.

If none of that describes the project, compiling to plain CSS with the SCSS compiler is usually the shorter path. Reach for Stylus only when something already there requires it.

Questions about moving SCSS onto Stylus

Punctuation, hashes, extend, and the two or three constructs still worth a manual look.

Why did $radius become radius = 8px instead of radius: 8px?

Stylus reserves the colon for property declarations inside a selector. A variable assignment outside any block uses an equals sign, so a top level $radius: 8px; becomes radius = 8px. Indented lines are left with a colon on purpose, since indentation means the line sits inside a rule and is a property, not a variable.

What does the Bracketed and Bare toggle actually change?

Nothing about meaning. Stylus accepts braces, colons, and semicolons exactly like CSS, or none of them, relying on indentation instead. The toggle renders the same converted file both ways so you can match whichever style the rest of your Stylus project already uses.

Why does my Sass map still look like Sass in the output?

Stylus hashes use curly braces, (key: value) in Sass has to become {key: value} in Stylus, and the workbench will not guess which of several nested shapes you want. The line is left exactly as pasted so the punctuation swap stays visible instead of silently wrong.

Does @extend still work after conversion?

Yes. Stylus supports @extend with the same syntax Sass uses, so the keyword and its target selector pass through untouched. This is one of the clearest differences from a LESS port, where @extend has no equivalent at all.

My %placeholder became a real class. Is that a bug?

No, it is the honest outcome. Stylus has no silent selector, so a placeholder that used to emit nothing on its own now compiles to a real ruleset whether or not anything extends it. Delete the rule by hand if the extra output matters, or move the shared declarations into a mixin instead.

What happened to @use and the namespace I gave it?

It narrowed to a plain @import, and the namespace is gone, because Stylus imports merge every name into one shared scope the way older Sass @import did. A call like t.$brand becomes a bare brand, and a name that used an underscore to stay private in the module system is no longer private.

Is a for loop the same as @each?

Close enough for most files. A single value loop, @each $c in $list, becomes for c in list. A map loop with two variables becomes for key, val in map. The one difference to check is a numeric @for range, since Stylus's .. operator is always inclusive, and a Sass loop that used to instead of through can be off by one step after conversion.

Does this run a real Stylus compiler?

No. It rewrites syntax with pattern matching, the same approach every converter on this site uses, so nothing is evaluated or type checked. Compile the result with an actual Stylus toolchain before you ship it, especially on a file the notes panel flagged.

Is my stylesheet uploaded anywhere?

No. Parsing and rewriting run in JavaScript inside this page. Nothing is sent to a server, nothing is stored between visits, and closing the tab clears both panes.