JavaScript beautifier or indentation tool

by Ankur Jain on January 11, 2009

Sometimes an unformatted JavaScript code becomes nearly unreadable and difficult to understand. If you are in the habit of using such JavaScript codes, this little free web tool could be a boon for you. 

This piece of ugly looking unformatted code…
javascript-indentation-tool     

…transformed to…
javascript-beautifier

on a click of a ‘Beautify’ button.

It comes with other features like indent with tab character OR 2, 4 or 8 spaces. Also it provides you with an option to preserve existing line breaks.
Check out JavaScript beautifier now.

{ 2 comments… read them below or add one }

Adam July 11, 2010 at 3:10 PM

“This piece of ugly looking unformatted code” – it’s my standard formatting. It’s ugly because it uses 2 spaces indentation? Maybe it is, but write 10k of code (as one file) and you’ll notice, it’s sometimes hard to fit all you need on screen. So, call it ugly, but it is not unformatted.

Reply

randy January 4, 2011 at 12:07 AM

This indent code is good but how would you do an indent from a dropdown list, indenting item 2-10 and 12- 15.

Reply

Leave a Comment

Previous post:

Next post: