Quick answer: To use a JSON formatter, open the NimbusCalc JSON formatter, paste your data into “Input JSON or text”, choose an indent of 2 spaces, 4 spaces or Tab, then click “Beautify” to make it readable or “Validate” to find the exact line and column of the first syntax error. Click “Minify” to shrink it for an API request, or “JSON to CSV” to flatten nested objects into columns. Keys must use double quotes, and trailing commas and comments are not allowed. Parsing uses the browser’s built-in parser, so nothing is uploaded.

What a JSON formatter does

JSON stands for JavaScript Object Notation. It is a lightweight, language-independent text format for structured data, standardised in RFC 8259 and ECMA-404. Despite its name, JSON is used by virtually every programming language and is the dominant format for web APIs, configuration files, NoSQL documents and data exports.

A JSON document is built from six value types. Objects are unordered collections of key-value pairs wrapped in braces, arrays are ordered lists wrapped in brackets, and the remaining types are strings, numbers, booleans and null. Because the grammar is small and strict, parsers are fast and unambiguous. A JSON formatter changes only whitespace and layout; it never changes the underlying data. NimbusCalc was last updated on December 1, 2026 and is 100% local. You can disconnect from the internet and the tool keeps working.

How to beautify, validate and minify JSON (step by step)

JSON formatter workflow from pasted input through beautify, validate and JSON to CSV output

  1. Paste data into “Input JSON or text”. It is a textarea with placeholder “Paste JSON here, for example: {“name”:”Ada”,”scores”:[9,10,8]}”. Before input, the tool reads “Waiting for input. Paste JSON above, or click Load sample to try the tool.”
  2. Or click “Load sample”. The button fills the input with example data. “Clear” empties it.
  3. Choose an indent. The dropdown offers “2 spaces”, “4 spaces” and “Tab”.
  4. Click “Beautify”. The “Formatted result” textarea under “JSON output” shows indented, readable JSON.
  5. Click “Validate”. A valid document confirms; an invalid one reports the exact position of the first syntax error.
  6. Click “Minify”. All optional whitespace is stripped. A minified response is usually 15 to 40 percent smaller than a formatted one.
  7. Export the result. Use “Copy output” or “Download output” on the active “JSON output” or “CSV output” tab.

Four more buttons sit in the same toolbar. “Sort keys” orders object keys alphabetically, which is safe because key order has no meaning in JSON (array order does). “Escape” and “Unescape” add or remove backslash escaping for embedding JSON inside a string. “JSON to CSV” builds a flat table.

The JSON formatter button reference

Table of JSON formatter operations Beautify, Minify, Validate, Sort keys, Escape, Unescape and JSON to CSV

Button What it does When to use it
Beautify Adds indentation and line breaks Reviewing nested structures or pasting into documentation
Minify Removes all optional whitespace Reducing an API payload before transmission
Validate Parses and reports the first syntax error position Finding a broken config file
Sort keys Alphabetises object keys Diffing two JSON documents
Escape / Unescape Adds or removes backslash escaping Embedding JSON as a string value
JSON to CSV Flattens nested objects into dot-notation columns Opening data in Excel or Google Sheets

Never minify by hand. Deleting whitespace inside a string changes the data. Both beautifying and minifying produce documents that parse to exactly the same values.

How the JSON to CSV converter handles nested data

CSV is a flat, two-dimensional format, while JSON can be deeply nested. The converter flattens nested objects into dot-notation headers. For example {“id”: 1, “user”: {“name”: “Ada”, “city”: “London”}} becomes columns id, user.name and user.city. The converter takes the union of all keys across every record, so records with missing fields simply get empty cells. Arrays are kept as JSON text inside a single cell rather than being discarded. Values containing commas, quotes or line breaks are quoted according to RFC 4180, with internal quotes doubled. The result opens cleanly in Excel, Google Sheets, LibreOffice and most databases.

Choose JSON when you need native support for nested objects and arrays, real data types and API or config files. Choose CSV when you need a compact table for spreadsheets, analytics imports or bulk rows. In CSV everything is text and types are inferred.

Common JSON syntax mistakes (and how to fix them)

  • Trailing comma: {“a”:1,} — a comma must be followed by another member. Delete the last comma.
  • Single quotes: {‘a’: 1} — only double quotes are valid for strings and keys. Replace them.
  • Unquoted keys: {a: 1} — object keys must be JSON strings. Wrap every key in double quotes.
  • Comments: // note — standard JSON has no comment syntax. Remove comments or use a JSONC or JSON5 parser.
  • undefined, NaN, Infinity — these are not JSON value types. Use null or a string such as “NaN”.
  • Unescaped newline inside a string — control characters are forbidden. Use \n or close and reopen the string.
  • Duplicate keys — syntactically valid, but the last value wins in most parsers. Remove duplicates to avoid silent data loss.

Numbers also have strict rules: no leading plus sign, no leading zeros, no NaN or Infinity and no hexadecimal. Booleans and null are lowercase only. Undefined is not a JSON value.

Where this fits in your NimbusCalc workflow

Structured data rarely stays in one format. The expo lead cleaner turns messy contact text into structured fields you can paste here, and the trade show leads to CRM CSV guide shows the reverse CSV workflow. Turn an exported table into a figure with the one-sentence chart generator, tidy long documents with the article formatting tool, and share the final result using the Word to PDF conversion guide.

These NimbusCalc guides use the same step-by-step format. Continue with the percentage calculator guide for the arithmetic behind data reports and the final grade calculator guide for weighted-score tables.

Frequently asked questions

How do I check whether JSON is valid?

Click Validate. A valid document has double-quoted keys and string values, no trailing commas, no comments, no single quotes, and no undefined or NaN values.

What is the difference between formatting and minifying JSON?

Formatting adds indentation and line breaks for humans. Minifying removes all optional whitespace to reduce file size. Both preserve exactly the same data.

Can JSON contain comments?

No. Standard JSON has no comment syntax. Formats such as JSONC and JSON5 allow comments, but a strict JSON parser rejects them.

How do I convert nested JSON to CSV?

Click JSON to CSV. Nested objects become dot-notation columns such as address.city, the union of all keys becomes the header row, and arrays stay as JSON text in one cell.

Is my JSON uploaded to a server?

No. The tool parses with the browser’s built-in parser. No request is made, nothing is uploaded, and nothing is saved after you leave the page.