YUI JavaScript
YUI Compressor style minification: drop comments, collapse code whitespace and keep one space where identifiers touch. Identifier mangling is intentionally not performed (it needs scope analysis) and the boundary is documented.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Result
The result can be copied directly.
Enter JavaScript code to see the formatted result
Characters: 0 · Lines: 0
What this tool does
- Expand bundled minified code into readable multi-line structure.
- Normalise formatting before committing so diffs show real changes only.
- Minify back to one line to estimate the shipped size.
Example
Input
function f(){var s="a b";return s}Output
function f() {
var s="a b";
return s
}Indentation follows braces and semicolons; whitespace inside strings, template literals and comments is kept verbatim.
Frequently asked questions
Is whitespace inside strings collapsed?
No. A lexical scanner separates code, strings, template literals and comments so only code is re-flowed; `"a b"` keeps both spaces.
What about unterminated quotes?
It fails with `unterminated-token`: the boundary cannot be determined, and guessing would swallow the following code.
Is this a semantic formatter?
No. It re-flows on braces and semicolons without parsing an AST: structure is safe, but there is no width-based wrapping.
Which indents are supported?
2 spaces, 4 spaces and tabs.
Keywords:yui-jsformatconverterdeveloper