Diysb Tools

JSON सुंदर बनाएं

JSON को सुंदर प्रारूप में बदलें।

JSON टूल्स

JSON सुंदर बनाएं

यह टूल आपको JSON डेटा को उचित इंडेंटेशन और स्पेसिंग के साथ फॉर्मेट करने की अनुमति देता है, जिससे यह अधिक पठनीय और काम करने में आसान हो जाता है।

इनपुट JSON
सुंदर JSON
टूल विकल्प
खरोज
रिक्त स्थान का उपयोग करें
रिक्त स्थान के साथ आउटपुट इंडेंट करें
टैब का उपयोग करें
टैब के साथ आउटपुट इंडेंट करें.
JSON सुंदर बनाएं उदाहरण

Beautify an Ugly JSON Array

In this example, we prettify an ugly JSON array. The input data is a one-dimensional array of numbers [1,2,3] but they are all over the place. This array gets cleaned up and transformed into a more readable format where each element is on a new line with an appropriate indentation using four spaces.

[ 1, 2,3 ]
[ 1, 2,3 ]
[ 1, 2, 3 ]
[ 1, 2, 3 ]
खरोज
रिक्त स्थान का उपयोग करें
रिक्त स्थान के साथ आउटपुट इंडेंट करें
टैब का उपयोग करें
टैब के साथ आउटपुट इंडेंट करें.

Prettify a Complex JSON Object

In this example, we prettify a complex JSON data structure consisting of arrays and objects. The input data is a minified JSON object with multiple data structure depth levels. To make it neat and readable, we add two spaces for indentation to each depth level, making the JSON structure clear and easy to understand.

{"names":["jack","john","alex"],"hobbies":{"jack":["programming","rock climbing"],"john":["running","racing"],"alex":["dancing","fencing"]}}
{"names":["jack","john","alex"],"hobbies":{"jack":["programming","rock climbing"],"john":["running","racing"],"alex":["dancing","fencing"]}}
{ "names": [ "jack", "john", "alex" ], "hobbies": { "jack": [ "programming", "rock climbing" ], "john": [ "running", "racing" ], "alex": [ "dancing", "fencing" ] } }
{ "names": [ "jack", "john", "alex" ], "hobbies": { "jack": [ "programming", "rock climbing" ], "john": [ "running", "racing" ], "alex": [ "dancing", "fencing" ] } }
खरोज
रिक्त स्थान का उपयोग करें
रिक्त स्थान के साथ आउटपुट इंडेंट करें
टैब का उपयोग करें
टैब के साथ आउटपुट इंडेंट करें.

Beautify a JSON with Excessive Whitespace

In this example, we show how the JSON prettify tool can handle code with excessive whitespace. The input file has many leading and trailing spaces as well as spaces within the objects. The excessive whitespace makes the file bulky and hard to read and leads to a bad impression of the programmer who wrote it. The program removes all these unnecessary spaces and creates a proper data hierarchy that's easy to work with by adding indentation via tabs.

{ "name": "The Name of the Wind", "author" : "Patrick Rothfuss", "genre" : "Fantasy", "published" : 2007, "rating" : { "average" : 4.6, "goodreads" : 4.58, "amazon" : 4.4 }, "is_fiction" : true }
{ "name": "The Name of the Wind", "author" : "Patrick Rothfuss", "genre" : "Fantasy", "published" : 2007, "rating" : { "average" : 4.6, "goodreads" : 4.58, "amazon" : 4.4 }, "is_fiction" : true }
{ "name": "The Name of the Wind", "author": "Patrick Rothfuss", "genre": "Fantasy", "published": 2007, "rating": { "average": 4.6, "goodreads": 4.58, "amazon": 4.4 }, "is_fiction": true }
{ "name": "The Name of the Wind", "author": "Patrick Rothfuss", "genre": "Fantasy", "published": 2007, "rating": { "average": 4.6, "goodreads": 4.58, "amazon": 4.4 }, "is_fiction": true }
खरोज
रिक्त स्थान का उपयोग करें
रिक्त स्थान के साथ आउटपुट इंडेंट करें
टैब का उपयोग करें
टैब के साथ आउटपुट इंडेंट करें.