MMaster Tools
DeveloperRuns on your device

JSON Formatter

Paste compact or messy JSON and get it back neatly indented with your chosen spacing.

How it works

  1. 1

    Paste any JSON into the input — it can be compact, multi-line, or oddly indented.

  2. 2

    Pick your preferred indentation (2 spaces, 4 spaces, or tab) and toggle key sorting.

  3. 3

    Copy or download the clean, readable result. Nothing leaves your browser.

Questions

What happens when my JSON is invalid?

The tool shows an error explaining the problem so you can fix it before formatting.

Does sort-keys change anything other than order?

No — only the key order changes. All values, including nested arrays, stay intact.

Is my data sent to a server?

No. Formatting runs entirely in your browser; no data leaves your device.

JSON Minifier

JSON Minifier

Remove all whitespace and line breaks from a JSON document to shrink it as small as possible.

JSON Validator

JSON Validator

Check whether a JSON string is well-formed, and see the exact line and column of any syntax error.

JSON Beautifier

JSON Beautifier

Reformat JSON with sorted keys and readable indentation for easier reading and diffing.

JSON Tree Viewer

JSON Tree Viewer

Explore a JSON document as an interactive collapsible tree — expand and collapse any node.

XML Formatter

XML Formatter

Pretty-print XML with configurable indentation, preserving attributes, comments, and tag order.

XML Validator

XML Validator

Check XML for well-formedness and report every error with its line and column number.

YAML Formatter

YAML Formatter

Normalize and re-indent YAML, or convert it to JSON, with a configurable indent width.

Markdown Preview

Markdown Preview

Render Markdown as formatted HTML with GFM tables and task lists, updating live as you write.