Mr. Tools

How to

How to use JSON Formatter

A developer utility that formats, minifies, and validates JSON by simply pasting it in. It is designed to make error locations easier to understand and output easier to copy. Enter JSON, format or validate it, and copy the result.

JSON Formatter thumbnailJSON Formatter thumbnail

Use Cases

When to use it

  • Inspect an API response
  • Find where broken JSON fails
  • Paste formatted JSON into documentation
  • Reformat a config file to make it easier to read
  • Tidy JSON to make structural differences clearer
  • Identify an error location before fixing it

Capabilities

What this tool can do

  • Switch between formatting and minifying
  • Show syntax errors
  • Provide copy-friendly output
  • Switch between formatting and minifying with one click
  • Show error lines in invalid JSON
  • Copy formatted output directly to the clipboard

Guide

How to use each screen area

Learn how to use each screen area, including settings, input, previews, results, and saving.

01 HOWTO

JSON Input and Validation Area

Paste the JSON you want to format or minify into the left input area. You can also clear the input, copy the input, and validate the syntax here.

Screen showing the JSON Input and Validation Area in JSON FormatterScreen showing the JSON Input and Validation Area in JSON Formatter

What this area does

  • Enter JSON directly
  • Clear the current input
  • Copy the JSON being edited
  • Validate syntax before processing

Where to use it

01
JSON input

Enter the JSON you want to format or minify.

Screen showing where to use JSON input in JSON FormatterScreen showing where to use JSON input in JSON Formatter
02
Clear input

Remove the current input and start again with another JSON value.

Screen showing where to use Clear input in JSON FormatterScreen showing where to use Clear input in JSON Formatter
03
Copy input

Copy the JSON being edited into notes or reviews.

Screen showing where to use Copy input in JSON FormatterScreen showing where to use Copy input in JSON Formatter
04
Syntax validation

Check JSON syntax errors before formatting.

Screen showing where to use Syntax validation in JSON FormatterScreen showing where to use Syntax validation in JSON Formatter

02 HOWTO

Format and Minify Action Area

Use the top actions to format JSON for readability or minify it by removing extra whitespace. Review the result while adjusting the input.

Screen showing the Format and Minify Action Area in JSON FormatterScreen showing the Format and Minify Action Area in JSON Formatter

What this area does

  • Create readable formatted JSON
  • Create minified JSON
  • Review the converted result
  • Return to the input and revise it

Where to use it

01
Format

Convert JSON into an indented, readable shape.

Screen showing where to use Format in JSON FormatterScreen showing where to use Format in JSON Formatter
02
Minify

Convert JSON into a compact shape with less whitespace and fewer line breaks.

Screen showing where to use Minify in JSON FormatterScreen showing where to use Minify in JSON Formatter
03
Result area

Review the formatted or minified result.

Screen showing where to use Result area in JSON FormatterScreen showing where to use Result area in JSON Formatter
04
Review input

Return to the input area when the result is not what you expected.

Screen showing where to use Review input in JSON FormatterScreen showing where to use Review input in JSON Formatter

03 HOWTO

Result Review and Copy Area

Review the converted JSON in the right result area, adjust the output shape, and copy it before sharing or pasting into configuration files.

Screen showing the Result Review and Copy Area in JSON FormatterScreen showing the Result Review and Copy Area in JSON Formatter

What this area does

  • Review the converted result
  • Copy the result
  • Use formatted output
  • Use minified output

Where to use it

01
Review result

Check the processed JSON in the right result area.

Screen showing where to use Review result in JSON FormatterScreen showing where to use Review result in JSON Formatter
02
Copy result

Copy the converted JSON to the clipboard.

Screen showing where to use Copy result in JSON FormatterScreen showing where to use Copy result in JSON Formatter
03
Use formatted output

Use the readable shape for reviews and specification checks.

Screen showing where to use Use formatted output in JSON FormatterScreen showing where to use Use formatted output in JSON Formatter
04
Use minified output

Use the compact shape for pasting or saving.

Screen showing where to use Use minified output in JSON FormatterScreen showing where to use Use minified output in JSON Formatter

04 HOWTO

Syntax Validation and Re-edit Area

When JSON cannot be processed or the result is unexpected, use this area to validate syntax, edit input, clear input, and copy the confirmed result.

Screen showing the Syntax Validation and Re-edit Area in JSON FormatterScreen showing the Syntax Validation and Re-edit Area in JSON Formatter

What this area does

  • Check syntax errors
  • Revise the input JSON
  • Clear input and start again
  • Copy the confirmed result

Where to use it

01
Syntax validation

Check whether the input can be processed as JSON.

Screen showing where to use Syntax validation in JSON FormatterScreen showing where to use Syntax validation in JSON Formatter
02
Edit input

Fix the left input based on validation or output results.

Screen showing where to use Edit input in JSON FormatterScreen showing where to use Edit input in JSON Formatter
03
Clear input

Remove the current input and start again with new JSON.

Screen showing where to use Clear input in JSON FormatterScreen showing where to use Clear input in JSON Formatter
04
Copy result

Copy the corrected result after reviewing it.

Screen showing where to use Copy result in JSON FormatterScreen showing where to use Copy result in JSON Formatter

Notes

Notes

Important points are grouped with reasons so you can make decisions before using the tool.

Things to check

Review the whole JSON before pasting

A partially copied JSON string will not format correctly. Pasting the full response or full settings object makes errors easier to find.

Things to check

Use formatting and minifying based on the purpose

Formatting is better for review, while minifying is better for transfer or embedding. Switching the output based on the goal makes work faster.

Note

Only standard JSON is supported — other formats are not

This tool is designed for standard JSON only. YAML, XML, and JSON5 are not supported. Confirm that your content is valid JSON before using it.

FAQ

Questions about JSON Formatter

Questions that make decisions easier before use are summarized first.

Can it handle large JSON?

It works within what the browser can handle. Extremely large JSON may take longer to format or validate and can make the page less responsive.

Can it format anything other than JSON?

This page supports only JSON formatting, minifying, and validation. YAML and XML are not supported here.

Can I change the indentation size?

Not at this time. The tool uses a standard indentation setting. Custom indent widths are not supported.

Can it handle JSON with comments (JSON5 or JSONC)?

This page supports standard JSON only. JSON5 and JSONC (with comments) are not supported.

Can I copy the output directly?

Yes. You can copy the formatted or minified result with one click.

How large a JSON file can it handle?

Processing is limited to what the browser can handle. Very large JSON files may cause the page to slow down.

Next guides

Related guides

Related guides are listed next so you can continue without getting lost.