Reputation: 4523
I have some JavaScript code that is written in one line (no carriage returns), it's completely unreadable...
With Notepad++, I tried to replace these characters ({
, }
, ;
) by themselves plus a carriage return, but it still isn't very handy...
Is there a way to do this correctly in Notepad++?
Upvotes: 95
Views: 151112
Reputation: 2111
JSTool is the best for stability.
Steps:
Reference:
Upvotes: 201
Reputation: 1098
Try the notepad++ plugin JSMinNpp(Changed name to JSTool since 1.15)
Upvotes: 51
Reputation: 6136
Could you use online services like this ?
Update: (as per request)
Google chrome will do this also http://cristian-radulescu.ro/article/pretty-print-javascript-with-google-chrome.html
Upvotes: 7
Reputation: 38740
I think you want a code beautifier, this one looks quick and easy: http://jsbeautifier.org/
Upvotes: 64