JSON / YAML / XML Formatter & Converter
Pretty-print, minify and validate JSON, YAML and XML, and convert between JSON and YAML, with clear error locations. Nothing leaves your browser.
{
"service": "api-gateway",
"replicas": 3,
"env": {
"LOG_LEVEL": "info",
"REGION": "uksouth"
},
"ports": [
{
"name": "https",
"port": 443
},
{
"name": "metrics",
"port": 9090
}
],
"healthCheck": {
"path": "/healthz",
"intervalSeconds": 15
}
}Converting YAML to JSON drops comments and anchors, because JSON has no equivalent. XML files that declare entities aren’t processed, to protect against entity-expansion attacks.
What it does
- Format, minify, validatePretty-print or minify JSON, YAML and XML with 2-space, 4-space or tab indentation.
- Convert JSON ↔ YAMLTurn a JSON payload into YAML for Kubernetes or Ansible, or the other way round.
- Errors you can fixPlain-English error messages with the line and column, and a button that jumps straight there.
- PrivateProcessed in your browser. Configs often contain secrets, so nothing is uploaded or stored.
How to use it
- Paste JSON, YAML or XML
The format is detected automatically.
- Choose Format, Minify, or convert to JSON or YAML
- Pick an indent and, optionally, sort keys A–Z
Sorting keys makes two configs easier to compare.
- Copy or download the result
Questions people ask
Is my config uploaded?
No. Formatting and conversion happen in your browser. Nothing you paste is sent to a server or stored.
Why did my YAML comments disappear when converting to JSON?
JSON has no comment syntax, so comments can’t be carried over. Anchors and aliases are expanded for the same reason.
Will “no” or “yes” be turned into booleans?
No. This tool parses YAML 1.2, where only true and false are booleans. Older YAML 1.1 parsers treat yes/no/on/off as booleans (the “Norway problem”), so quote them if another tool reads the file.
Why is my JSON invalid?
The most common causes are trailing commas, single quotes instead of double quotes, and comments. The error message shows the line and column of the problem.
Last updated 4 Dec 2026 · More in Data & Developer Utilities