JSON Formatter




Format JSON

Formatting JSON is one of the most important things you need to learn whenever you're working with JSON data. Normally to save bandwith servers serve JSON on a single line. This is good for speed, however it's bad for readability. This is for example how you would get a JSON object from an APIs server:

{"id":6702,"hidden":false,"community_profile":false,"name":"AngelList","angellist_url":"https://angel.co/angellist","logo_url":"https://d1qb2nb5cznatu.cloudfront.net/startups/i/6702-766d1ce00c99ce9a5cbc19d0c87a436e-medium_jpg.jpg?buster=1367604615","thumb_url":"https://d1qb2nb5cznatu.cloudfront.net/startups/i/6702-766d1ce00c99ce9a5cbc19d0c87a436e-thumb_jpg.jpg?buster=1367604615","quality":10,"product_desc":"AngelList is a platform for startups to meet investors, talent and incubators. \n\n- Meet investors http://angel.co/people/investors and raise money online http://angel.co/invest\n\n- Meet candidates http://angel.co/jobs\n\n- Apply to incubators http://angel.co/incubators/apply\n\nWe also have an API http://angel.co/api.","high_concept":"A platform for startups.","follower_count":6452,"company_url":"http://angel.co","created_at":"2011-03-18T00:24:29Z","updated_at":"2014-11-04T01:06:30Z","crunchbase_url":"http://www.crunchbase.com/company/angellist","twitter_url":"http://twitter.com/angellist","blog_url":"http://blog.angel.co"}

How to make JSON formatted

As you can see that's not really reabable at all. To format the JSON so that oyu can read it you can use the little pretty print JSON tool above. Just paste your raw JSON files and it will automatically make it nicely formatted. For example, the earlier JSON then becomes better formatted like this:

{
  "id": 6702,
"hidden": false,
"community_profile": false,
"name": "AngelList",
"angellist_url": "https://angel.co/angellist",
"logo_url": "https://d1qb2nb5cznatu.cloudfront.net/startups/i/6702-766d1ce00c99ce9a5cbc19d0c87a436e-medium_jpg.jpg?buster=1367604615",
"thumb_url": "https://d1qb2nb5cznatu.cloudfront.net/startups/i/6702-766d1ce00c99ce9a5cbc19d0c87a436e-thumb_jpg.jpg?buster=1367604615",
"quality": 10,
"product_desc": "AngelList is a platform for startups to meet investors, talent and incubators. \n\n- Meet investors http://angel.co/people/investors and raise money online http://angel.co/invest\n\n- Meet candidates http://angel.co/jobs\n\n- Apply to incubators http://angel.co/incubators/apply\n\nWe also have an API http://angel.co/api.",
"high_concept": "A platform for startups.",
"follower_count": 6452,
"company_url": "http://angel.co",
"created_at": "2011-03-18T00:24:29Z",
"updated_at": "2014-11-04T01:06:30Z",
"crunchbase_url": "http://www.crunchbase.com/company/angellist",
"twitter_url": "http://twitter.com/angellist",
"blog_url": "http://blog.angel.co" }

As you probably agree, the second JSON pretty printed example is actually much easier to read because its formatted more clearly.

JSON in readable format

So to sum it up, just use this little tool when you need to quickly loop over some different JSON data when you're developing your applications. It would be great if you could share this JSON tool so that more people can save time by using it. Thanks a lot!

JSON Pretty Print