JSON Beautifier

Beautify ugly, minified JSON code using JSON Beautifier and give it proper indentation to make it more readable.

Make JSON/JSONP readable

Javascript
JSON
CSS
HTML
XML
Beautify Code (Control+Enter)
Unpack / Deobfuscate
⤓ Save to device
Select a theme:

HTML <style>, <script> formatting:

Additional Settings (JSON):












Keep in mind

  • Always keep a backup and verify your code before publishing!
  • We use local storage to improve user experience.
  • This website doesn't send your code to the server and doesn't save it.
  • Please report if you find an error or you have any suggestion.

Commands

Commands are parameter-less actions that can be performed on an editor. Their main use is for key bindings.

Ctrl-Enter
Beautify Code.
Ctrl-A (PC), Cmd-A (Mac)
Select the whole content of the editor.
Ctrl-D (PC), Cmd-D (Mac)
Deletes the whole line under the cursor, including newline at the end.
Ctrl-Z (PC), Cmd-Z (Mac)
Undo the last change.
Ctrl-Y (PC), Cmd-Y (Mac)
Redo the last undone change.
Ctrl-F (PC), Cmd-F (Mac)
Find
Ctrl-G (PC), Cmd-G (Mac)
Find Next
Shift-Ctrl-G (PC)
Shift-Cmd-G (Mac)
Find Previous
Shift-Ctrl-F (PC)
Cmd-Alt-F (Mac)
Replace
Shift-Ctrl-R (PC)
Shift-Cmd-Alt-F (Mac)
Replace All
Javascript Beautifier CSS Beautifier HTML Beautifier XML Beautifier

Why use JSON Beautifier?

The JSON Beautifier was created to help folks with debugging. As JSON data is often output without line breaks to save space, it can be extremely difficult to actually read and make sense of it. This tool hoped to solve the problem by formatting and beautifying the JSON data so that it is easy to read and debug by human beings.

JSON or JavaScript Object Notation is a language-independent open data format that uses human-readable text to express data objects consisting of attribute-value pairs. Although originally derived from the JavaScript scripting language, JSON data can be generated and parsed with a wide variety of programming languages including JavaScript, PHP, Python, Ruby, and Java.

JSON is a data format that is gaining popularity and used extensively in many AJAX powered Web sites. Many websites which offer API's, which will return data in JSON format. Often the JSON provided has white space compressed to reduce the size of the data transferred. This site gives you a quick and easy way to format the JSON so you can read it.

How To Use?

Enter JSON data then click Beautify button

To format JSON, type or paste your JSON data in the editor and click on the Beautify button to validate and format the entered JSON.

The tool also allows you to upload a .json or .txt file containing JSON data. It reads the file and automatically fills the editor with the file’s contents. Moreover, there are various other controls provided in the settings toolbar to clear, copy, minify, prettify, and download JSON data from the editor.

Frequently Asked Questions

+ What is JSON?

JSON is commonly used data format for asynchronous browser-server communication. It has replaced XML in many AJAX style systems. It is more compact and easier to parse than XML.

The official Internet content type for JSON is application/json. Browsers and servers set the Content-Type HTTP header to application/json whenever JSON is used as the data-interchange format.

JSON structure and the rules are pretty simple. JSON is very easy to generate and parse. Perhaps, that’s why It is widely used in browser-server as well as server-server communications.

It's compact because it doesn't use a full markup structure, unlike XML. It's easy to parse, especially in JavaScript.

+ JSON syntax

There are just a few rules that you need to remember:

  1. Objects are encapsulated within opening and closing brackets { }
  2. An empty object can be represented by { }
  3. Arrays are encapsulated within opening and closing square brackets [ ]
  4. An empty array can be represented by [ ]
  5. A member is represented by a key-value pair
  6. The key of a member should be contained in double quotes. (JavaScript does not require this. JavaScript and some parsers will tolerate single-quotes)
  7. Each member should have a unique key within an object structure
  8. The value of a member must be contained in double quotes if it's a string (JavaScript and some parsers will tolerates single-quotes)
  9. Boolean values are represented using the true or false literals in lower case
  10. Number values are represented using double-precision floating-point format. Scientific notation is supported
  11. Numbers should not have leading zeroes
  12. "Offensive" characters in a string need to be escaped using the backslash character
  13. Null values are represented by the null literal in lower case
  14. Other object types, such as dates, are not properly supported and should be converted to strings. It becomes the responsibility of the parser/client to manage this
  15. Each member of an object or each array value must be followed by a comma if it's not the last one
  16. The common extension for json files is '.json'
  17. The mime type for json files is 'application/json'

+ How to use JSON

Modern browsers have a built-in global object JSON with encoding and decoding functions. These are:

JSON.stringify to encode a Javascript object into a JSON string; and JSON.parse to parse a JSON string and convert it to a Javascript object.

To support older browsers, use JSON2 written by Douglas Crockford as polyfill.

+ What is a JSON Beautifier?

This tool pretty prints JavaScript Object Notation (JSON) data files. You can customize indentation and make it spaces or tabs, whichever you prefer.

* All conversions and calculations are done in your browser using JavaScript. We don't send a single bit about your input data to our servers. There is no server-side processing at all. We use your browser's local storage to save tools' input. It stays on your computer.

Features

  • Beautify and debug JSON data with advanced formatting and validation algorithms.
  • JSON Beautifier which supports indentation levels: 2 spaces, 3 spaces, 4 spaces.
  • JSON & JSONP support.
  • Syntax highlighting.
  • View, validate, edit, and beautify JSON data in real time.
  • The powerful, feature rich, and user friendly JSON editor gives you a native editing experience.
  • Convert JSON Strings to a Friendly Readable Format
  • JSON Beautifier works well on Windows, MAC, Chrome, Firefox, Safari, and Edge.

Feedback

Robert: Best JSON Viewer and JSON Beautifier Online.

Andrew Siebert: This JSON Online tool is very powerful.

Lyle Lopez: Online JSON Beautifier beautifies unformatted, dirty JSON code and give it proper indentation to make it well formatted and readable.

Mary Smith: You no longer have to deal with the complex structure of JSON anymore because we have the tool to add beauty to your work.