JS-BEAUTIFY(1)
π¦ js-beautify β the manual page, bestie edition π
okay so. you found the manual for js-beautify, which lives in the User Commands section of the manual (section 1, iykyk). no cap, this thing is a whole vibe.
β¨ NAME β¨
js-beautify β beautify, unpack or deobfuscate JavaScript π
like. it takes your cursed little minified soup and makes it pretty again. that's the whole gig. main character energy fr.
πΈ DESCRIPTION πΈ
we're running js-beautify.js@1.15.4 bestie. write that down.
π CLI Options:
these are the knobs you turn from the command line. the actual driver's seat stuff.
-f,--fileβ the input file(s) you wanna feed it. pass-and it'll read from stdin instead, iconic.-r,--replaceβ writes the output in-place, so it straight up replaces your input file. yes, really. π«Ά-o,--outfileβ write the output to a file instead. default is stdout, as it should be.--configβ path to a config file, so you can stop typing the same flags over and over like a legend.--type [js|css|html] ["js"]β tells it what flavour of file it's dealing with. default is"js".-q,--quietβ suppress logging to stdout. shhh. π€«-h,--helpβ show this help. (hi, that's me, that's this page.)-v,--versionβ show the version. we love a version check.
π§ Beautifier Options:
now THIS is the fun part. this is where you sculpt. β¨
-s,--indent-sizeβ indentation size. default is4.-c,--indent-charβ the indentation character. default is" "(a space, bestie).-t,--indent-with-tabsβ indent with tabs instead. heads up: this overrides-sand-c. team tabs wins, sorry team spaces. π-e,--eolβ the character(s) to use as line terminators. default isfirst newline in file, otherwise "\n. it literally sniffs your file first, obsessed.-n,--end-with-newlineβ end the output with a newline. that's it. that's the flag.--indent-empty-linesβ keeps the indentation on empty lines. yes, even the blank ones get dressed up. π--templatingβ list of templating languages:(auto,none,angular,django,erb,handlebars,php,smarty). default is"auto". and fr fr, here's what auto means:auto = none in JavaScript, andauto = all except angular in html (and inline javascript/css). lowkey genius.--editorconfigβ use EditorConfig to set up the options. let the config file do the talking.-l,--indent-levelβ initial indentation level. default is0.-p,--preserve-newlinesβ preserve line-breaks. and if you want the opposite,--no-preserve-newlinesdisables it. π-m,--max-preserve-newlinesβ number of line-breaks to be preserved in one chunk. default is10.-P,--space-in-parenβ add padding spaces within paren, ie.f( a, b ). look at the lil breathing room. π-E,--space-in-empty-parenβ add a single space inside empty paren, ie.f( ).-j,--jslint-happyβ enable jslint-stricter mode. strict era.-a,--space-after-anon-functionβ add a space before an anonymous function's parens, ie.function ().--space_after_named_functionβ add a space before a named function's parens, ie.function example (). note the underscores, she's built different from-a.-b,--brace-styleβ[collapse|expand|end-expand|none][,preserve-inline]. default is[collapse,preserve-inline]. yes, it takes two parts. yes, the comma matters.-u,--unindent-chained-methodsβ don't indent chained method calls. let them hang out at the same level.-B,--break-chained-methodsβ break chained method calls across subsequent lines. one per line, we're being dramatic about it. π-k,--keep-array-indentationβ preserve array indentation. your hand-aligned arrays stay hand-aligned.-x,--unescape-stringsβ decode printable characters encoded inxNNnotation.-w,--wrap-line-lengthβ wrap lines that exceed N characters. default is0.-X,--e4xβ pass E4X xml literals through untouched. no notes, no changes.--good-stuffβ warm the cockles of Crockford's heart. π«Ά that is the entire documented description. I don't make the rules.-C,--comma-firstβ put commas at the beginning of a new line instead of at the end. controversial. iconic. ate.-O,--operator-positionβ set operator position(before-newline|after-newline|preserve-newline). default isbefore-newline.
ngl the whole point of this page is: it beautifies, unpacks, or deobfuscates JavaScript. everything above is just how you choose to make it look. periodt. π
and that's the whole manual, bestie!! π this was js-beautify version 1.15.4, documented back in March 2025, and it lives under the title JS-BEAUTIFY(1) in the User Commands section. go make something pretty with it. mwah. ππ¦β¨
π¦ where this page comes from
- debian trixie: node-js-beautify 1.15.4+dfsg+~cs1.31.6-1 Β· MIT
- ubuntu resolute: node-js-beautify 1.15.4+dfsg+~cs1.31.6-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms