Tool to Unminify / Decompress JavaScript [closed]

2019-01-01 09:57发布

Are there any command line scripts and/or online tools that can reverse the effects of minification similar to how Tidy can clean up horrific HTML?

(I'm specifically looking to unminify a minified JavaScript file, so variable renaming might still be an issue.)

17条回答
伤终究还是伤i
2楼-- · 2019-01-01 10:00

Got it! JSBeautifier does exactly this, and you even have options for the auto-formatting.

查看更多
笑指拈花
3楼-- · 2019-01-01 10:01

I'm not sure if you need source code. There is a free online JavaScript formatter at http://www.blackbeltcoder.com/Resources/JSFormatter.aspx.

查看更多
步步皆殇っ
4楼-- · 2019-01-01 10:01

Pretty Diff will beautify (pretty print) JavaScript in a way that conforms to JSLint and JSHint white space algorithms.

查看更多
看淡一切
5楼-- · 2019-01-01 10:01

Wasn't really happy with the output of jsbeautifier.org for what I was putting in, so I did some more searching and found this site: http://www.centralinternet.com.br/javascript-beautifier

Worked extremely well for me.

查看更多
倾城一夜雪
6楼-- · 2019-01-01 10:03

Can't you just use a javascript formatter (http://javascript.about.com/library/blformat.htm) ?

查看更多
君临天下
7楼-- · 2019-01-01 10:03

Despite its miles-away-from-being-pretty interface, JSPretty is a good, free and online tool for making javascript source codes human-readable. You can enforce your preferred type of indentation and it can also detect obfuscation.

查看更多
登录 后发表回答