How to use
Format your data in seconds:
- Paste your content into the input box.
- Select Auto (or force JSON / XML / SQL) and choose indent options.
- Click Pretty Print (or Minify), then copy the output.
FAQ
What formats does this pretty print formatter support?
It formats JSON, XML, and SQL, plus a simple “Text cleanup” mode that removes trailing spaces and normalizes newlines.
Does it upload my data to a server?
No. Formatting runs locally in your browser; the tool does not make network requests.
Why am I seeing an “Invalid JSON” or “Invalid XML” error?
The input can’t be parsed (common causes: missing quotes/brackets in JSON or unclosed tags in XML). Fix the syntax and format again.
What does “Auto-detect” do?
It tries JSON first, then XML, then falls back to SQL/text heuristics. If it guesses wrong, force the correct mode.
What does “Sort JSON keys” change?
It alphabetically sorts object keys (recursively) to make output stable for diffs; arrays keep their original order.
Can I minify after formatting?
Yes—use Minify to compact JSON/XML/SQL into a smaller string for sharing or storage.
How do I format with tabs instead of spaces?
Set Indent to Tabs and click Pretty Print.