Browser Based Javascript Code Compactor and Formatter

This is a simple tool that can help you compact or cleanup your Javascript code without having to worry about it breaking by random code obscurities. I came across this a while ago when I was trying to compact some Javascript files into one line and I was running into errors. There are some random issues where a bit of code cannot share a line with another.

It is based on the toString and toSource methods. It gives you a glimpse of how the browser sees the code. I believe this tool only works in Firefox, but the code it produces works the same as it was originally written in all browsers.

Paste your Javascript code in the box below.

Leave a Reply

{
}