Javascript unpacker and beautifier

Options



This little beautifier will reformat and reindent bookmarklets, ugly javascript, unpack scripts packed by the popular Dean Edward's packer, as well as deobfuscate scripts processed by javascriptobfuscator.com.

The source code for the latest version is always available on github, and you can download the beautifier for local use (zip, tar.gz) as well.

Formatting from command-line

To beautify from the command-line you can use provided beautify-cl.js script, using Rhino javascript engine. See the file contents for the details.

Fiddler

This popular web debugging proxy for Windows has a Javascript Formatter addon (based on this beautifier) which can reformat javascript on the fly.

Vim

Aj3423 converted the script to vimscript — and so now there is a vim plugin for the quality javascript beautifying.

gEdit

Fabio Nagao has written some tips for the gEdit users, among them he tells how to integrate the beautifier into the editor.

Other nice things

If you're writing javascript code, JSLint is a really fine piece of software, too. You don't have to follow its recommendations blindly, but understanding what it says about your code can greatly improve your skills.

Support

Some of you have expressed an esoteric wish to thank me for the beautifier financially, and I gladly agree to that.

As the beautifier is — and always will be — completely free and open, donating is a wonderful thing to do and it will probably make you feel good and warm inside.

Contacts

If you find some problems with the generated javascript, adapt the script for your favorite editor, or something, my email is einar@jsbeautifier.org.