Tool to Unminify / Decompress JavaScript
You can use this : http://jsbeautifier.org/
But it depends on the minify method you are using, this one only formats the code, it doesn't change variable names, nor uncompress base62 encoding.
edit: in fact it can unpack "packed" scripts (packed with Dean Edward's packer : http://dean.edwards.name/packer/)
Unminify / Decompress JavaScript
The thing is that you cannot really "unminify" your code since some data was already lost - e.g. variable names. You can reformat it to more readable form though.
- According to this question, since VisualStudio 2012 you can just use Ctrl+E, D keyboard shortcut
- If the above is not right, there is this extension for VS 2010: http://visualstudiogallery.msdn.microsoft.com/41a0cc2f-eefd-4342-9fa9-3626855ca22a but I am not sure if it works with VS 2013
- There is an extension to VisualStudio called ReSharper which can reformat javascript in a few different manners.
- Also there are online formatters already mentioned in other answers (if your code is confidential, I would advise some paranoia manifested by downloading sources and using them locally).
- Also you may always try to find unminified version of desired library on the interwebs
- Also, there is the WebStorm IDE from JetBrains that is able to reformat JS - you may download a trial for the sole purpose of reformatting your minified scripts :)
- If that's just to make debugging easier, you may want to use source maps
Also, here is a bunch of related questions:
How to automatically indent source code? <-- this is for VS2010, but it looks promising, maybe it will help you if it supports JavaScript (and it does since VS2012 according to MS support):
Ctrl+E, D - Format whole doc
Ctrl+K, Ctrl+F - Format selection
reindent(reformat) minimized jquery/javascript file in visual studio
Visual Studio 2010 can't format complex JavaScript documents
Visual Studio code formatter
how to make visual studio javascript formatting work?
I am not sure if they figured out a working way to reformat JS, but I've seen a few answers which might be helpful - I am just pasting this in here just FYI.
Added 03.06.2014:
http://www.jsnice.org/
This tool could be useful too, it even tries to infer minified names. As stated on their website:
We will rename variables and parameters to names that we learn from thousands of open source projects.
Is there a plugin that allows me to automatically unminify the Javascript included on a site?
In chrome 13+, there is 'pretty print'.
- Right click 'inspect element'
- Go to Script tab
- Click the curly braces in the bottom right.
Related Topics
How to Set Multiple CSS Styles in JavaScript
Getting Unexpected Token Export
How to Capitalize First Letter of Each Word, Like a 2-Word City
Get Protocol, Domain, and Port from Url
Pass Parameters in Setinterval Function
JavaScript Get Window X/Y Position for Scroll
Difference Between "Change" and "Input" Event for an 'Input' Element
How to Insert Text into the Textarea at the Current Cursor Position
Angularjs - How to Use $Routeparams in Generating the Templateurl
How to Use Redirect in Version 5 of React-Router-Dom of Reactjs
Get All Attributes of an Element Using Jquery
JavaScript - Get Minutes Between Two Dates
How to Extract the Hostname Portion of a Url in JavaScript
Remove All White Spaces from Text
Detecting When a Div's Height Changes Using Jquery
How to Convert Date to Timestamp
How to Return a List of All the Image File Names from a Folder Using Only JavaScript