js-beautify
js-beautify is a free, open-source tool for reformatting and re-indenting JavaScript, including bookmarklets and packed scripts.
What js-beautify is
js-beautify is a free, open-source tool for reformatting and re-indenting JavaScript, including bookmarklets and packed scripts. Its JavaScript implementation also formats JSON, HTML, CSS, SCSS, and SASS. You can use it through a web browser, or run it from the command line with Node.js or Python. The browser interface provides controls for indentation, line wrapping, chained methods, JSX syntax, and HTML attributes. As a library, the JavaScript version exposes beautifiers for JavaScript, CSS, and HTML, while the Python version reformats JavaScript only and does not handle HTML or CSS. Configuration can be supplied with command-line flags, library options, or files such as .jsbeautifyrc. Editor integrations and plugins are listed for Visual Studio Code, Sublime Text, Vim, and Emacs. The project is released under the MIT licence, with no listed usage limits. The README notes limited owner time, a need for contributors, and no uptime or support guarantees for free CDN services.
Good
- Formats JavaScript, JSON, HTML, CSS, SCSS, and SASS
- Browser controls cover indentation and wrapping
- Runs with Node.js or Python
- JavaScript library supports CSS and HTML
- Open source under the MIT licence
Watch out
- Python version does not format HTML or CSS
- Free CDN services have no uptime guarantees
- Project needs contributors for bugs and implementation issues
Who it suits
It suits developers who need configurable formatting in a browser, command line, library, or supported editor. Python users should note that its formatter handles JavaScript only.
Verdict
js-beautify provides broad formatting coverage across web languages and several ways to run it. Its Python limitations and the project’s stated support constraints are important considerations.
Plans and prices
From js-beautify's own pricing page, checked 5 Oct 2026.
| Plan | Price | What it gives you |
|---|---|---|
| Free | Free | Source code is free and open under the MIT licence · no listed usage limits |
The facts
Each one read from js-beautify's own pages, with the date it was checked.
What it does
- Configuration
- Options can be set through CLI flags, library options, and JavaScript configuration files such as .jsbeautifyrc.checked 5 Oct 2026
- Editor support
- The project page lists related integrations and plugins for editors including Visual Studio Code, Sublime Text, Vim, and Emacs.checked 5 Oct 2026
- Integrations
- The README documents embedding the web library using scripts hosted on cdnjs and rawgit.checked 5 Oct 2026
- Languages
- The JavaScript version formats JavaScript, JSON, HTML, CSS, SCSS, and SASS.checked 5 Oct 2026
- Library use
- The JavaScript library exposes beautifiers for JavaScript, CSS, and HTML, while the Python version only reformats JavaScript.checked 5 Oct 2026
- Open source
- The source code is free and open under the MIT licence, with the repository README requiring retention of the copyright notice and license.checked 5 Oct 2026
- Project status
- The README says the existing owners have limited time and that the project needs contributors to address bugs and implementation issues.checked 5 Oct 2026
- Purpose
- js-beautify reformats and re-indents JavaScript, including bookmarklets and packed scripts.checked 5 Oct 2026
- Python limitation
- The Python version does not reformat HTML or CSS, and the project no longer supports Python 2.checked 5 Oct 2026
- Security
- The opened project pages provide no security or compliance certification details.checked 5 Oct 2026
- Support limits
- The README says its free CDN services have no uptime or support guarantees.checked 5 Oct 2026
- Ways to use
- The project can be used in a browser or from the command line with Node.js or Python.checked 5 Oct 2026
The company
- Maker
- The website credits Einar Lielmanis as creator and Liam Newman as maintainer.checked 5 Oct 2026
Where it runs
- Web app options
- The web interface offers formatting controls for indentation, line wrapping, chained methods, JSX syntax, and HTML attributes.checked 5 Oct 2026
Alternatives to js-beautify
- 1

Prettier
Free planOpen sourceWebAPIExtensionLinux7.5Free plan - 2
Avidemux
Free planOpen sourceWebLinuxmacOSWindows7.3Free plan - 3
Fourmolu
Free planWebLinuxWindows6.7Free plan - 4
rustfmt
Free planLinuxmacOSWindows6.6Free plan - 5
Black
Free planLinuxmacOSSelf-hostedWindows6.5Free plan - 6

Ruff
Free planWebLinuxmacOSSelf-hosted6.5Free plan
