To edit a JSON file, an IDE like Eclipse could be used. One of the functions is that it can format the json file for you. To use this function in Eclipse, you should install an plugin called "JSON Edit" which you can find it in SourceForge: http://sourceforge.net/projects/eclipsejsonedit/
Actually the last version is 0.9.4.
Once downloaded, you can install it by:
1. Descompress the zip file. You will see two folders: plugins and features
2. Copy the content of the features (json.editor.plugin.feature_0.9.4.jar) into the folder of eclipse:
Eclipse -> features
3. Copy the content of the plugins (json.editor.plugin_0.9.4.jar) into the folder of eclipse:
Eclipse -> plugins
4. Restart eclipse.
If everything went well, you should able to see the "Json Editor" in the preferences:
Then, for any json file, you can open it with the Json editor if it is in the explorer of eclipse:
Finally, you can choose the option "Format text" option in Edit menu to format the Json content.