JSON Editor

Edit JSON with syntax highlighting, validation and formatting.

The JSON Editor is a text editor for JSON with syntax highlighting, live validation and one-click Format and Minify actions. It is meant for developers who need to tweak an API payload, config file or fixture and see immediately whether it still parses. Errors are reported with a line and column, and the offending line is flagged in the editor.

What is JSON?

JSON (JavaScript Object Notation) is a text format for structured data, defined in RFC 8259 and ECMA-404. It supports objects in curly braces, arrays in square brackets, strings, numbers, true, false and null. The grammar is strict: keys and strings must use double quotes, trailing commas are not allowed, and comments do not exist. Because almost every language can parse it, JSON became the default format for web APIs, configuration files and data exchange. Its strictness is also why a single stray comma or single quote makes a whole document invalid, which is exactly what an editor with validation helps you catch.

How to use JSON Editor

  1. Load or paste JSON Type directly in the JSON editor, or use the file load button to open a .json file.
  2. Check the status Read the message under the editor: Valid JSON, or Invalid JSON with the error and its line and column.
  3. Pick an indent and action Choose 2 spaces, 4 spaces or Tab under Indent, then press Format or Minify in the Action control.
  4. Export the result Use Copy to put the text on the clipboard or Download to save it as data.json.

Frequently asked questions

Does it support comments or trailing commas?

No. It validates strict JSON, so comments, trailing commas and single-quoted strings are reported as invalid. Remove them first, or convert JSON5 or JSONC files to plain JSON before pasting.

What do the Format and Minify buttons change?

They replace the editor text with a re-serialized version of the same data. Format adds line breaks and your chosen indent; Minify removes all optional whitespace. Key order and values are preserved.

What does the Validate action do?

It does not change the text. If the content is valid, it shows a Valid JSON confirmation; invalid content keeps showing the error with its line and column.

Can I open a file?

Yes. The file load button accepts .json files and puts the contents into the editor. Use Download to save the current text as data.json.

Why is the error position slightly off?

The line and column come from the JavaScript JSON parser and point to where parsing failed, which is often just after the real mistake, for example at the token following a missing comma.