JSON tools

JSON formatterRead the structure, keep the values

Automatic mode updates the result 400ms after input or options change. Turn it off to show the run button, or use Ctrl/Cmd+Enter. Outdated results cannot be exported.

JSON formatter

These four actions process the input as text. Use the result as input to chain actions; Undo restores the previous state.

JSON or text input

Your inputs stay in this browser tab. No upload or persistent storage.

Result

Changes detected. Updating the result…

A one-line API response hides the field you are trying to inspect. This JSON formatter doubles as a JSON beautifier: it opens up nested objects while keeping long IDs and decimal spellings intact. You can check the hierarchy before changing anything.

Use the JSON minifier for compact payloads and the JSON editor for targeted branch replacements. Formatting does not automatically sort or clean your data: those decisions have a separate preview.

Change representation with a visible result

Keep array positions meaningful

A missing property and an explicit null can mean different things to an API. The cleanup preview shows the proposed document beside the current output. Null and empty-value removal applies only to object properties; array elements keep their positions. An empty container created by removing children can also disappear from its parent object.

Two nested data trees with matching array positions; empty object-property branches are highlighted in the preview and removed from the second tree.

Move between readable text and escaped strings

Logs often contain a JSON document inside a string. Escape adds one layer of backslashes without outer quotes; Unescape removes one layer, including surrounding quotes when provided. Compare both columns before using the result as input. Unicode conversion changes character spelling while keeping the layout and long numeric IDs.

Two documents with matching content; amber backslashes precede quotes in the right document, with opposing arrows indicating escape and unescape.

Three details to check before exporting

01

Automatic or manual

Automatic mode updates the result 400ms after input or options change. Turn it off to show the run button, or use Ctrl/Cmd+Enter. Outdated results cannot be exported.

02

Edit a branch as a JSON value

In tree view, expand a container and choose Edit. Replace a value or an entire branch with valid JSON; strings need double quotes. Saving updates both editors and keeps one undo snapshot.

03

Inspect the proposed cleanup

Choose sorting, null removal or empty removal, then preview. Copy and download still refer to the current result until you apply the preview. Undo restores the state before the last applied edit or cleanup.

Formatting and editing in one workspace

Exact numeric spelling

Numbers remain source tokens: 900719925474099312345, 1.00, -0 and exponent notation are emitted without converting them to floating point. This protects identifiers as well as precision-sensitive samples.

A tree you can change

Expand objects and arrays on demand. Each container reveals 50 children at a time, with a button for more. Edit uses the selected path, so a key containing a slash or tilde still targets the right value.

Useful output measurements

See Unicode character count, UTF-8 bytes, maximum node depth and object-key count for the current result. Multibyte text explains why bytes may exceed characters; the root has depth zero.

Four text conversions

Escape quotes, backslashes and control characters, or decode one JSON string layer. Convert non-ASCII characters to Unicode escapes and back, including emoji surrogate pairs. Text results remain copyable and downloadable even when they are not JSON documents.

What changes, and what stays

Formatting rejects duplicate keys
Comments, trailing commas, unquoted names and duplicate keys stop processing. A repeated key is rejected even if its spelling uses a Unicode escape. The source remains available for correction; no last-value-wins parsing occurs.
Two cleanup switches
Null removal deletes object properties whose value is null. Empty removal deletes empty strings, arrays and objects, recursively from the bottom up. Whitespace-only strings, false and 0 remain; root values and array elements are never deleted.
Deterministic key sorting
Sort keys applies recursively to objects in UTF-16 code-unit order, including objects inside arrays. It is case-sensitive, not a locale-aware dictionary sort. Arrays never reorder.
Values, not original text layout
Formatting preserves string values but may rewrite escape sequences: \u0061 may become a. Two or four spaces and tabs are supported; Minify removes formatting whitespace, not spaces inside strings. This is not a byte-identical or canonical JSON serializer.
Bounded input and output
Input allows 500,000 UTF-16 code units, 50,000 nodes, depth 100 and numeric tokens up to 1,000 characters. Output is capped at 2,000,000 code units. Over-limit work fails without a partial export.
Text conversion is separate from formatting
The four text actions do not validate document structure. Unescape accepts JSON string contents or a quoted JSON string and rejects invalid escapes. Unicode decoding preserves escaped literal backslashes, controls, quotes, backslashes and unpaired surrogates; malformed Unicode tokens stay unchanged. Text encoding escapes all non-ASCII UTF-16 units.

Common JSON formatter questions

Does it cost anything?

No account or payment is required. The JSON formatter, the tree editor and the export controls are all free to use.

Is my input kept private?

Yes. Processing stays in the current tab. There is no saved document history or shareable payload URL; copy and download are explicit actions.

Can it repair malformed input?

It reports syntax failures with a line and column, but does not guess missing quotes or remove comments. Correct the source and run again.

Can it check validity?

Format and Minify check JSON syntax and duplicate keys before producing output. It does not validate against a JSON Schema or your application’s field requirements.

What else can I do here?

Replace a tree branch, inspect output statistics, or preview sorted keys and removal of empty object properties. Converting to another data format is a separate task.

Found an unexpected result?

Run the next response through the JSON formatter

Load the example to see how the JSON formatter handles indentation, compact output and a cleanup preview.