Advertisement

JSON Editor

Work with JSON in the JSON Editor: format, minify, validate with error positions, sort keys and escape strings.

JSON editor

Paste JSON, then pick an action.

Paste JSON above to begin.
Advertisement

What each action does

Format pretty-prints with 2-space indent; Minify strips all whitespace; Validate checks syntax and points at the exact failing character; Sort keys orders object keys alphabetically at every depth; Escape turns the whole document into a quoted JSON string.

Stats line

After any successful action you get key count, maximum nesting depth and byte size. Deep nesting (dozens of levels) can crash naive parsers, so the depth number is a useful sanity check before sending data on.

JSON Editor FAQs

Why is my JSON invalid?
Common causes: trailing commas, single quotes, comments, or unquoted keys. The error message shows the exact character position.
Does it fix my JSON automatically?
No. It reports the error location; you fix the syntax. Auto-fixing risks changing your data's meaning.
What is escaping for?
Embedding JSON inside another JSON string, a JavaScript snippet, or a config value that requires quoted strings.
Can it handle large files?
Yes, within browser memory. Multi-megabyte documents format fine; extremely large ones may take a moment.
Is my data uploaded?
No. Parsing runs entirely in your browser.
Advertisement