1. Home
  2. Computing & Technology
  3. JavaScript

Javascript Formatter

Related Articles

Javascript Compressor

Does your Javascript code look a mess? Are you trying to work out how someone else's Javascript does what it does but it is so messy you can't read it?

If you paste a copy of the script into the form below and then select the "Clean" button then a nicely formatted copy will be displayed in a separate window that uses consistent indenting and has all of the reserved words, predefined objects, comments, and literals all colour coded to make the code easier to follow.

Note that the form is only expecting to process Javascript so if you paste anything else (eg. HTML not enclosed within document.write statements) then you will not get any meaningful results.


Note: if your browser security settings are preventing this script from opening a new page to display the results then you may wish to use the single page version.

Explore JavaScript
Must Reads
By Category
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

JavaScript
  1. Home
  2. Computing & Technology
  3. JavaScript
Add to:

©2009 About.com, a part of The New York Times Company.

All rights reserved.