JSON and XML Beautifier
Format, validate and minify JSON or XML with the indentation you choose.
Runs in your browser. Nothing you enter is uploaded.
Beautified
Paste JSON or XML, or open a file.
About JSON and XML Beautifier
The JSON and XML Beautifier turns compact or messy data into readable, consistently indented text. It detects the format automatically, reports where invalid data goes wrong, and can also minify data to remove unneeded whitespace.
Formatting works on the original text, so values are never altered. Very large numbers keep every digit, duplicate keys stay in place, and XML comments, CDATA sections and mixed content are preserved.
How to use JSON and XML Beautifier
- 01Paste your JSON or XML, or open a file.
- 02Choose Beautify or Minify, and an indentation size.
- 03Copy the formatted result, or fix any reported error.
Features
- Automatic JSON and XML detection
- Validation with error messages
- Indentation of 2 spaces, 4 spaces or tabs
- Minify mode that removes unneeded whitespace
Frequently asked questions
- How do I format JSON online?
- Paste your JSON into the input box. It is validated and formatted immediately, and you can copy the result with one click.
- Will formatting change my data?
- No. Only whitespace between values changes. Numbers, strings, key order and duplicate keys stay exactly as you wrote them, including numbers too large for JavaScript to represent.
- What is the difference between beautify and minify?
- Beautify adds line breaks and indentation so people can read the data. Minify removes that whitespace to make the data smaller for storage or transfer.
- Is my data uploaded?
- No. It runs entirely in your browser, and nothing you enter or open is uploaded, stored or sent to a server.