Free, private, browser-based
Free online JSON formatter and XML formatter
Two focused tools built on a real code editor: paste a document, fold it like you would in VS Code, and format, validate or minify it in place. Precise errors with line and column numbers. No uploads, no accounts, no tracking of your data.
JSON Formatter
Beautify, validate and minify JSON online. Errors are reported with a line and
column, and values are preserved exactly — 1.0, 1e3 and
very large integers keep their original spelling.
XML Formatter
Indent, validate and minify XML online. Comments, CDATA sections and attribute formatting survive untouched, and every element gets a foldable chevron in the gutter.
Open the XML tool →An online JSON formatter and XML formatter built for documents you actually read
Most online formatters hand your document to a server, or hide the result behind duplicated input and output boxes. These tools take a different approach: there is one editable surface, and every action updates it in place. Nothing is sent anywhere.
- Single editor. Paste, type, open a file or drop one in — format, validate and minify all act on that one document.
- Real code folding. Collapse any object, array or element with a gutter chevron, or fold the whole document at once.
- Accurate errors. Invalid input is never destroyed; the problem is reported by line and column and highlighted inline.
- Your indentation. 1, 2, 4 or 8 spaces, or tabs, remembered between visits.
- Accessible. Keyboard shortcuts throughout, WCAG AA contrast in both light and dark themes, and no keyboard trap.
- Nothing uploaded. All processing happens locally, so private payloads stay private.
JSON formatter or XML formatter: which do you need?
JSON formatter for APIs and config
JSON is the default interchange format for web APIs, configuration files and package manifests. Common tasks are pretty-printing a minified API response, checking a hand-edited config file for a stray trailing comma, and shrinking a payload before committing it. Head to the JSON formatter to format JSON online, or jump straight to the JSON formatter FAQ.
XML formatter for feeds, SVG and build files
XML still underpins RSS and Atom feeds, SVG and XHTML source, build files, property lists and many enterprise integrations. Because XML treats whitespace as potentially significant, formatting it needs care — the XML formatter documents exactly which whitespace it rewrites and guarantees everything else is preserved. There is also an XML formatter FAQ for the common questions.
Frequently asked questions
Are these JSON and XML tools really free?
Yes. Both tools are free to use with no account, no sign-up and no usage limit. Because every operation runs in your browser rather than on a server, there is no per-request cost to pass on to you.
Is it safe to paste sensitive data?
Yes. The documents you paste are processed by JavaScript in your own browser and are never uploaded, logged or stored. You can confirm this yourself by watching the network panel in your browser developer tools while you use the tools — no request carries your document.
Which tool should I use, JSON or XML?
Use the JSON formatter for API payloads, configuration files, package manifests and anything ending in .json. Use the XML formatter for RSS and Atom feeds, SVG and XHTML source, build files, .plist documents and anything ending in .xml.
Do the tools support code folding?
Yes. Both use a real code editor with folding built in. Click a chevron beside any object, array or element to collapse it in place, or use Collapse All to fold every level of the document at once. Folding only affects what is on screen and never rewrites your data.
Can I control the indentation?
Yes. Choose 1, 2, 4 or 8 spaces, or tabs. Changing the setting reformats the whole document immediately, and your choice is remembered the next time you visit.
Do the tools work offline?
Once a page has loaded, all formatting, validation and minifying continues to work without a network connection. Downloading a result or copying it to the clipboard also works offline.
About these tools
JSON & XML Tools is a small, focused utility site. Read more about the project, see the privacy policy to understand exactly what is and is not collected, or get in touch with a bug report or suggestion.