Aller au contenu principal
en

(01) — TOOLS

JSON and XML, readable.

Paste a payload. The tool indents or minifies it, and flags broken syntax. Nothing is sent.

Format
Indent

At a glance

(02) — METHOD

Parse, then rewrite.

01 — JSON

JSON.parse, then JSON.stringify with 2 or 4 spaces. Minify = one line.

02 — XML

DOMParser as application/xml, then an indented rewrite. A mismatched tag is rejected.

03 — Local

The text stays in the tab. No upload, no API.

(03) — FAQ

Short answers.

Why is my JSON rejected?
JSON requires double quotes around keys and strings, with no comments or trailing commas. For example, {"name":"Alex","active":true} is valid, but a JavaScript object with unquoted keys is not. The formatter reports parser errors; it does not repair invalid input or validate it against a schema.
Can formatting change data or whitespace?
Keep a copy of your original. JSON is parsed as JavaScript values, so very large integers may lose precision and duplicate object keys are not preserved. The XML serializer trims text whitespace and does not preserve every node type. Use a specialist tool for signed XML or documents where exact whitespace matters. This tool does not convert JSON into XML.
HTML too?
No. XML mode wants well-formed XML (closed tags, case kept). Loose HTML will often fail.
Are XML comments kept?
Yes, comments and CDATA are rewritten. An <?xml … ?> declaration is kept if it was there.
Is anything sent to a server?
No. It stays in the tab.

← All tools