🌐
Kali Linux Tools
en.kali.tools
JS Beautifier - Penetration Testing Tools
sudo pip3 install jsbeautifier sudo pip3 install cssbeautifier js-beautify -h ... It is not necessary to install the program on a computer, the author has created a page that can beautify JavaScript code: https://beautifier.io/ ... KaliTools April 10, 2021 beautifier for source code, Computer ...
Main
JS Beautifier · JStillery · OllyDbg · Reverse · smali · TrID · UglifyJS · Valgrind · YARA · CaseFile · CutyCapt · dos2unix · Dradis · KeepNote · MagicTree · Metagoofil · Nipper-ng · pipal ·
All Programs
Tools for penetration testing and security audit · List of all available tools for penetration testing
Cheap VDS/VPS
Please click here if you are not redirected within a few seconds · You will be redirected in 3 seconds. If your browser does not automatically redirect you, please click here
🌐
Kali Linux Tools
en.kali.tools › all
python-jsbeautifier
Description: JavaScript unobfuscator and beautifier
🌐
Kali
kali.tools
JS Beautifier — Инструменты Kali Linux
sudo pip3 install jsbeautifier sudo pip3 install cssbeautifier js-beautify -h ... Вместо установки на свой компьютер вы можете использовать онлайн версию: https://beautifier.io/
🌐
Installati.one
installati.one › home › how to install node-js-beautify on kali linux
How To Install node-js-beautify on Kali Linux | Installati.one
June 1, 2023 - In this tutorial we learn how to install node-js-beautify on Kali Linux. ... This little beautifier will reformat and reindent bookmarklets, ugly JavaScript, unpack scripts packed by Dean Edward??s popular packer, as well as deobfuscate scripts ...
🌐
Installati.one
installati.one › home › how to install jsbeautifier on kali linux
How To Install jsbeautifier on Kali Linux | Installati.one
June 1, 2023 - In this tutorial we learn how to install jsbeautifier on Kali Linux. jsbeautifier is JavaScript unobfuscator and beautifier
🌐
PyPI
pypi.org › project › jsbeautifier
jsbeautifier · PyPI
JavaScript unobfuscator and beautifier.
      » pip install jsbeautifier
    
Published   Feb 27, 2025
Version   1.15.4
🌐
Repology
repology.org › project › js-beautify › packages
js-beautify packages - Repology
Kali Linux Rolling main · 1.15.3 (1.15.3-1) Maintainer: havard.f.aasen@pfft.no · Category: misc · Link(s): Package pageok · Upstream homepageredir, no IPv6 · MacPorts · 1.15.4 · Summary: JS beautifier written in Python · Maintainer: nomaintainer@macports.org ·
🌐
Command Not Found
command-not-found.com › js-beautify
command-not-found.com – js-beautify
JavaScript unobfuscator and beautifier · Maintainer: Sebastien Delafond <[email protected]> Homepage: https://github.com/beautify-web/js-beautify · Section: misc · All systems · curl cmd.cat/js-beautify.sh · Debian · apt-get install jsbeautifier · Ubuntu · apt-get install jsbeautifier · Arch Linux · pacman -S node-js-beautify · Kali Linux ·
🌐
GitHub
github.com › beautifier › js-beautify
GitHub - beautifier/js-beautify: Beautifier for javascript · GitHub
... To use js-beautify as a node library (after install locally), import and call the appropriate beautifier method for JavaScript (JS), CSS, or HTML. All three method signatures are beautify(code, options).
Starred by 9K users
Forked by 1.4K users
Languages   JavaScript 42.8% | HTML 35.9% | Python 15.5% | Mustache 2.7% | Shell 2.6% | Makefile 0.3% | CSS 0.2%
Find elsewhere
🌐
Kali Linux Tools
en.kali.tools
de4js - Penetration Testing Tools
KaliTools April 18, 2021 beautifier for source code, Computer forensics, deobfuscation, JavaScript, obfuscation Reverse Engineering Comments Off on de4js
🌐
JSON Formatter
jsonformatter.org › b9e805
kali
This JSON online formatter can also work as JSON Lint. Use Auto switch to turn auto update on or off for beautification.
Top answer
1 of 10
76

First, pick your favorite Javascript based Pretty Print/Beautifier. I prefer the one at http://jsbeautifier.org/, because it's what I found first. Downloads its file https://github.com/beautify-web/js-beautify/blob/master/js/lib/beautify.js

Second, download and install The Mozilla group's Java based Javascript engine, Rhino. "Install" is a little bit misleading; Download the zip file, extract everything, place js.jar in your Java classpath (or Library/Java/Extensions on OS X). You can then run scripts with an invocation similar to this

java -cp js.jar org.mozilla.javascript.tools.shell.Main name-of-script.js

Use the Pretty Print/Beautifier from step 1 to write a small shell script that will read in your javascript file and run it through the Pretty Print/Beautifier from step one. For example

//original code    
(function() { ... js_beautify code ... }());

//new code
print(global.js_beautify(readFile(arguments[0])));

Rhino gives javascript a few extra useful functions that don't necessarily make sense in a browser context, but do in a console context. The function print does what you'd expect, and prints out a string. The function readFile accepts a file path string as an argument and returns the contents of that file.

You'd invoke the above something like

java -cp js.jar org.mozilla.javascript.tools.shell.Main beautify.js file-to-pp.js

You can mix and match Java and Javascript in your Rhino run scripts, so if you know a little Java it shouldn't be too hard to get this running with text-streams as well.

2 of 10
64

UPDATE April 2014:

The beautifier has been rewritten since I answered this in 2010. There is now a python module in there, an npm Package for nodejs, and the jar file is gone. Please read the project page on github.com.

Python style:

$ pip install jsbeautifier

NPM style:

$ npm -g install js-beautify

to use it (this will return the beatified js file on the terminal, the main file remains unchanged):

$ js-beautify file.js

To make the changes take effect on the file, you should use this command:

$ js-beautify -r file.js

Original answer

Adding to Answer of @Alan Storm

the command line beautifier based on http://jsbeautifier.org/ has gotten a bit easier to use, because it is now (alternatively) based on the V8 javascript engine (c++ code) instead of rhino (java-based JS engine, packaged as "js.jar"). So you can use V8 instead of rhino.

How to use:

download jsbeautifier.org zip file from http://github.com/einars/js-beautify/zipball/master

(this is a download URL linked to a zip file such as http://download.github.com/einars-js-beautify-10384df.zip)

old (no longer works, jar file is gone)

java -jar js.jar  name-of-script.js

new (alternative)

install/compile v8 lib FROM svn, see v8/README.txt in above-mentioned zip file

./jsbeautify somefile.js

-has slightly different command line options than the rhino version,

-and works great in Eclipse when configured as an "External Tool"

🌐
Beautifier
beautifier.io
Online JavaScript beautifier
End script and style with newline? Support e4x/jsx syntax Use comma-first list style? Detect packers and obfuscators? (unsafe) Preserve inline braces/code blocks? Keep array indentation? Break lines on chained methods? Space before conditional: "if(x)" / "if (x)" Unescape printable chars encoded ...
🌐
Linux packages
linux-packages.com › kali-linux › package › jsbeautifier
Complete Guide: Installing jsbeautifier on Kali Linux 2025
Learn how to install jsbeautifier on Kali Linux $ sudo apt update Copied $ sudo apt install jsbeautifier Copied
🌐
Miloserdov
miloserdov.org
JS Beautifier - Ethical hacking and penetration testing
Alex May 3, 2020 deobfuscation, JavaScript, JS Beautifier, JStillery, obfuscation, UglifyJS, web browsers, web-sites, webapps Reverse Engineering One Comment » · Telegram notifications about new articles on Miloserdov.org: t.me/miloserdov_org · Anonymity, data encryption and anti-forensics · Exploitation · Hardware · Improving security · Information Gathering · IT Forensics · Kali Linux ·
🌐
Kali Linux Tools
en.kali.tools
JStillery - Penetration Testing Tools
It is not necessary to install the program on a computer, the author has created a page that can de-obfuscate JavaScript code: https://mindedsecurity.github.io/jstillery/ ... KaliTools April 10, 2021 beautifier for source code, Computer forensics, deobfuscation, JavaScript Reverse Engineering ...
🌐
Miloserdov
miloserdov.org
How to deobfuscate JavaScript code - Ethical hacking and penetration testing
JStillery can be used without installation – the program is available as an online service from the author: https://mindedsecurity.github.io/jstillery/. ... To compile the server (if you need not only a tool with a command line interface, but you also want to use the web interface): ... Obfuscator.IO (but does not always work, as this service is frequently updated, which requires updating the deobfuscator) ... Information about installation and launch can be found on the program page: https://en.kali.tools/?p=1372
🌐
OnWorks
onworks.net › home › software › app js beautifier
JS Beautifier
JS Beautifier
JS Beautifier free download and run online in OnWorks over Linux online like Ubuntu, Fedora, Debian, Kali Linux
Rating: 4 ​
🌐
OnWorks
onworks.net › home › software › linux › app js beautifier
JS Beautifier download for Linux
JS Beautifier download for Linux
JS Beautifier free download and run online in OnWorks over Linux online like Ubuntu, Fedora, Debian, Kali Linux
Rating: 4 ​