JSON Text Tools

Jsonformatter and Text Tools

JSON Formatter & Validator

1
Processed output will appear here...
Recent History

About the JSON Formatter & Validator

Paste raw or minified JSON and get clean, indented, color-highlighted output in one click. The tool also validates your data: if something is wrong it tells you what and where, so you can fix it quickly. Valid results open as a collapsible tree you can search, expand and collapse.

How to use it

  1. Paste JSON into the input box, or drop a .json file onto it.
  2. Choose an indentation: 2, 3 or 4 spaces, or a tab.
  3. Press Process (or Ctrl+Enter). Copy or download the formatted result.

Common use cases

Example

Input:

{"name":"Mary Jane","roles":["admin","editor"]}

Output with 2 spaces:

{
  "name": "Mary Jane",
  "roles": [
    "admin",
    "editor"
  ]
}

Mistakes it catches

Trailing commas, single quotes, unquoted keys and missing brackets are reported with their position. See how to fix each one.

Frequently asked questions

Is my JSON uploaded anywhere?

No. Formatting and validation run in your browser with JavaScript. Your data is never sent to a server.

What does the validator check?

It parses your text with the standard JSON rules. Trailing commas, single quotes, unquoted keys and comments are rejected because they are not valid JSON.

Can it handle large files?

Yes, within your browser's memory limits. Very large files (tens of MB) may be slow because the tree view renders every node.

Related

All tools

Guides

Message here