1. Tech

Your suggestion is on its way!

An email with a link to:


was emailed to:

Thanks for sharing About.com with others!

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 "Format" button then a nicely formatted copy will be displayed 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 a string being assigned to innerHTML) then you will not get any meaningful results.

When the "Format" button is pressed your formatted output will appear below (with a different coloured background so that it will be obvious where the formatted code starts and finishes). Note that any lines too long to fit may require that you scroll horizontally to see the entire formatted content.

Related Video
How to Format Slides in PowerPoint

©2017 About.com. All rights reserved.