Loading tool...
Loading tool...
JSON Developer Utilities
A JSON formatter adds indentation and line breaks so nested data is easy to read, and checks that the text is valid JSON. Most of the time the values come out exactly as they went in. There are a few cases where they don't, and they are worth knowing before you format IDs, prices or configuration files.
This guide uses the DevMeldex JSON/CSV Formatter, which runs in your browser using its built-in JSON parser. Every example below was run in the browser and in Node.js, which follow the same JavaScript rules.
Try the examples as you read:
Open the JSON/CSV Formatter →Input: {"name":"devmeldex","tools":["json","regex"],"free":true}
Format JSON:
{
"name": "devmeldex",
"tools": [
"json",
"regex"
],
"free": true
}If the input is not valid, the tool shows your browser's parser error instead of an output. In Chrome and Edge, a trailing comma such as {"a":1,} gives Expected double-quoted property name in JSON at position 7 (line 1 column 8). Other browsers word it differently. The formatter page lists the most common syntax errors and how to fix them.
Formatting parses your JSON into JavaScript values and writes them back out. That round trip keeps strings, booleans and normal numbers exactly, but it changes four things:
Input: {"b":1,"2":2,"a":3,"1":4}
Output: {"1":4,"2":2,"b":1,"a":3}JavaScript objects list keys that look like whole numbers first, in numeric order, then the other keys in their original order. If key order matters to a person reading the file, keep number-like keys out of mixed objects.
Input: {"id":12345678901234567890}
Output: {"id":12345678901234567000}JavaScript stores numbers as 64-bit floating point, so integers beyond 9,007,199,254,740,991 are rounded. Long IDs, such as some database or social media IDs, should be sent as strings.
Input: {"a":1,"a":2}
Output: {"a":2}Duplicate keys are valid JSON syntax, so validation passes, but the first value is silently dropped.
Input: {"s":"caf\u00e9"}
Output: {"s":"café"}The text is the same, but the bytes change, which matters if you compare files or calculate a checksum.
These are JavaScript rules, not JSON rules. Python's json module, for example, keeps large integers exactly and keeps keys in their original order, although it also keeps only the last value of a duplicate key.
Valid JSON can still be wrong for your application: a missing required field, a number where a string is expected, or an unexpected extra key all pass validation. To check structure and types, validate against a JSON Schema in your code or build pipeline. To compare two versions of a response or config file, format both the same way and compare them with the Diff Checker, so only real changes are highlighted.
Everything runs in your browser, so the limit is your device rather than an upload size. In our test on a desktop computer, formatting 10 MB of JSON took under a second; pasting that much text into the input box took a few seconds. Results longer than 200,000 characters are shown as a preview so the page stays responsive, and Copy Output always copies the full result.
JSON to CSV works best with an array of flat objects: each object becomes a row and each key a column. Nested objects and arrays are written into one cell as JSON text, so flatten them first if you need separate columns.
If a cell starts with =, +, - or @, the tool warns you, because spreadsheet apps such as Excel may treat it as a formula when you open the file. The CSV text itself is not changed, so check those cells before opening it.
Formatting makes JSON readable and catches syntax errors, but it is a round trip through JavaScript. Send long IDs as strings, avoid duplicate keys, and validate structure separately when it matters.
Discover browser-based tools for formatting, debugging, testing and developer workflows.
Browse All Tools →