Example: a hand-edited record that will not load
Someone edited a business record by hand and used single quotes around one key, which JSON does not allow. The validator stops at that point and shows the line with a caret under the problem, so there is no need to read the whole file.
Once the quotes are fixed, the same text formats cleanly and the message changes to Valid JSON.
{
"name": "Harbour Bakery",
"town": "Whitby",
'open': true
}Invalid JSON at line 4, column 3: Expected double-quoted property name in JSON at position 52 (line 4 column 3) 'open': true ^
Formatting and exploring JSON
Paste the JSON
An object, an array or a whole API response. The result updates as you type and shows a tick when the text is valid.
Choose the layout
Indent with 2 spaces, 4 spaces or tabs, or Minify to remove all whitespace for a config file or an API request.
Sort keys if useful
Sort keys A to Z puts object keys in alphabetical order at every level, which makes two versions of a record much easier to compare.
Open the tree view
Switch View to Tree to expand and collapse nested objects. Click a value to see its path, such as
$.results[0].status, and copy it.Copy or download
In text view, copy the formatted result or download it as formatted.json.
Errors you will meet most often
| Problem | Looks like | Fix |
|---|---|---|
| Trailing comma | ["bread", "cakes",] | Remove the comma after the last item |
| Single quotes | 'open': true | Use double quotes for keys and strings |
| Unquoted key | {name: "Harbour"} | Put the key in double quotes |
| Comments | // note | JSON has no comments; remove them |
| Missing comma between items | "a": 1 "b": 2 | Add a comma after each value except the last |
| Values copied from JavaScript | NaN, undefined | Replace with null or a number |
Questions people ask
How do I check if JSON is valid?
Paste it into the box. If it parses, a Valid JSON tick appears and the formatted version is shown. If not, you see the error message from the browser's own JSON parser and, where it reports a position, the line and column with a caret under the character where parsing stopped.
What does Sort keys A to Z do?
It reorders the keys inside every object alphabetically, at every level of nesting, while leaving the order of items in arrays alone. The data means exactly the same thing. It is useful before comparing two records with a diff tool, because matching keys then line up.
What is a JSON path?
A path describes where a value sits inside the data, starting from $ for the top. $.results[0].status means the status key of the first item in the results array. Many tools, spreadsheets and automation platforms accept paths like this to pick out one field from an API response.
Can it handle large files?
It works on whatever your browser can hold in memory, so files of a few megabytes are usually fine. Very large exports can make the page slow, especially in tree view. For those, minify or split the file first, or use a desktop editor.
Is my JSON uploaded?
No. Parsing, formatting and the tree view all run in your browser. Nothing you paste, including API keys or customer data inside the JSON, is sent to Map Extract or any other server.
Where your data goes
Everything runs in your browser. The JSON you paste is not uploaded to Map Extract or anywhere else.
Checked against the tool on