JSON Converters Code Gen Formatters All tools Browse all tools built byAbhay Darji

XML Pretty Print

Pretty print XML with two, three or four spaces, or tabs. Consistent indentation applied throughout, instantly and privately.

100% client side No upload No size limit Works offline
Input
Output
Ready
Drop a file to load it

About this tool

Indent XML consistently with two, three or four spaces, or tabs.

When you would use it

  • Matching a project’s indentation convention
  • Making XML readable for review

Worked example

XML
<?xml version="1.0" encoding="UTF-8"?>
<user id="4815">
  <name>Ada Lovelace</name>
  <active>true</active>
  <score>91.5</score>
  <roles>
    <role>admin</role>
    <role>editor</role>
  </roles>
</user>
Pretty printed
<?xml version="1.0" encoding="UTF-8"?>
<user id="4815">
  <name>Ada Lovelace</name>
  <active>true</active>
  <score>91.5</score>
  <roles>
    <role>admin</role>
    <role>editor</role>
  </roles>
</user>

Things worth knowing

  • Identical to the XML formatter, with the indentation control front and centre.
Questions

Frequently asked

Which indent width should I pick?
Two spaces is the most common default. Match whatever your repository already uses so diffs stay clean.
Is my data uploaded anywhere?
No. Every tool on JSONWorks runs entirely in your browser using JavaScript. Your input is never sent to a server, never logged and never stored. The simplest proof is to disconnect from the internet — the tools keep working. The site does load Google Fonts and a Google Analytics page-view tag, so you will see those two requests in your network tab, but neither receives anything you type or paste.
Does it work offline?
Yes. JSONWorks is installable as a progressive web app and caches itself on first visit, so every tool keeps working without a connection.
Related

Tools that pair well with this