---
name: "js-beautify-js"
section: "1"
platform: "linux"
package: "node-js-beautify"
version: "1.15.4+dfsg+~cs1.31.6-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/js-beautify-js"
---

# js-beautify-js(1)

beautify, unpack or deobfuscate JavaScript

## NAME

js-beautify - beautify, unpack or deobfuscate JavaScript

## DESCRIPTION

js-beautify.js@1.15.4

### CLI Options:

- **-f**, **--file**

  Input file(s) (Pass '-' for stdin)

- **-r**, **--replace**

  Write output in-place, replacing input

- **-o**, **--outfile**

  Write output to file (default stdout)

- **--config**

  Path to config file

- **--type**

  \[js\|css\|html\] \["js"\]

- **-q**, **--quiet**

  Suppress logging to stdout

- **-h**, **--help**

  Show this help

- **-v**, **--version**

  Show the version

### Beautifier Options:

- **-s**, **--indent-size**

  Indentation size \[4\]

- **-c**, **--indent-char**

  Indentation character \[" "\]

- **-t**, **--indent-with-tabs**

  Indent with tabs, overrides **-s** and **-c**

- **-e**, **--eol**

  Character(s) to use as line terminators. \[first newline in file, otherwise "\\n\]

- **-n**, **--end-with-newline**

  End output with newline

- **--indent-empty-lines**

  Keep indentation on empty lines

- **--templating**

  List of templating languages (auto,none,angular,django,erb,handlebars,php,smarty) \["auto", auto = none in JavaScript, auto = all except angular in html (and inline javascript/css)\]

- **--editorconfig**

  Use EditorConfig to set up the options

- **-l**, **--indent-level**

  Initial indentation level \[0\]

- **-p**, **--preserve-newlines**

  Preserve line-breaks (**--no-preserve-newlines** disables)

- **-m**, **--max-preserve-newlines**

  Number of line-breaks to be preserved in one chunk \[10\]

- **-P**, **--space-in-paren**

  Add padding spaces within paren, ie. f( a, b )

- **-E**, **--space-in-empty-paren**

  Add a single space inside empty paren, ie. f( )

- **-j**, **--jslint-happy**

  Enable jslint-stricter mode

- **-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 ()

- **-b**, **--brace-style**

  \[collapse\|expand\|end-expand\|none\]\[,preserve-inline\] \[collapse,preserve-inline\]

- **-u**, **--unindent-chained-methods**

  Don't indent chained method calls

- **-B**, **--break-chained-methods**

  Break chained method calls across subsequent lines

- **-k**, **--keep-array-indentation**

  Preserve array indentation

- **-x**, **--unescape-strings**

  Decode printable characters encoded in xNN notation

- **-w**, **--wrap-line-length**

  Wrap lines that exceed N characters \[0\]

- **-X**, **--e4x**

  Pass E4X xml literals through untouched

- **--good-stuff**

  Warm the cockles of Crockford's heart

- **-C**, **--comma-first**

  Put commas at the beginning of new line instead of end

- **-O**, **--operator-position**

  Set operator position (before-newline\|after-newline\|preserve-newline) \[before-newline\]
