JSON Formatter
Free online JSON formatter tool, minify and validate
About JSON Formatter
A three-mode JSON tool that runs JSON.parse on your input and then either pretty-prints with 2-space indentation, collapses to a single minified line, or reports validity. Invalid JSON surfaces the native parse error message in a red error panel.
How to Use
1. Paste JSON into the input textarea. 2. Pick a mode tab: Format, Minify, or Validate. 3. Click the action button (Format JSON, Minify JSON, or Validate). 4. Use Copy on the output card to copy the result. Switching modes clears the previous output.
Mode Behaviors
Format mode calls JSON.stringify(parsed, null, 2) for indented output. Minify mode calls JSON.stringify(parsed) with no spaces, producing the most compact valid form. Validate mode does not transform the input; it only confirms the JSON is parseable and shows a success message. On parse failure the raw error from the JavaScript engine is shown and no output is produced.
▶What indentation does Format mode use?
▶Does Minify remove comments or trailing commas?
▶Does the tool preserve key order?
▶What happens when I switch tabs?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee