How to use
Use it as a quick beautifier/minifier for JSON, XML, or SQL.
- Paste your text into the input box.
- Select Auto (or force JSON/XML/SQL).
- Choose indent size and optional settings (like sorting JSON keys).
- Click Pretty Print or Minify, then Copy Output.
FAQ
What formats does this pretty print converter support?
It supports JSON, XML, and SQL. Auto-detect chooses a format based on the first non-space character.
Does this tool upload my data to a server?
No. Formatting runs locally in your browser and the tool does not make network requests.
Why do I see a JSON error?
JSON must be strictly valid (double quotes, no trailing commas). Fix the reported issue and run Pretty Print again.
Can I sort JSON keys for stable diffs?
Yes—enable “Sort JSON keys” to recursively sort object keys before output.
Is the XML formatter a validator?
It parses XML to check well-formedness, then formats it. For complex edge cases, use a dedicated XML validator.
How does SQL formatting work here?
It applies lightweight spacing and line breaks around common clauses. It won’t fully understand dialect-specific syntax.
How do I quickly format using the keyboard?
Use Ctrl/⌘ + Enter to Pretty Print, and Ctrl/⌘ + M to Minify.