Bytelify

XML Prettify

Format and indent minified XML into clean, readable markup, live as you type.

Runs in your browser, nothing sent
xml-prettify
Formatted
<?xml version="1.0"?>
<note>
  <to>Alice</to>
  <from>Bob</from>
  <body>Hi!</body>
</note>

Re-indents XML based on tag nesting, live as you type. Runs entirely in your browser; nothing you type is sent anywhere.

Need the opposite? XML Minifier

What is XML Prettify?

Paste minified or single-line XML and get it reformatted into clean, indented markup instantly, based on tag nesting depth. Useful for making a single-line SOAP response, RSS feed, or config file readable before you review or edit it, the kind of file that's often minified in transit but painful to read that way. Formatting runs entirely in your browser.

How to Use XML Prettify

  1. 1

    Paste the Minified XML: Enter single-line or compact XML.

  2. 2

    Read the Formatted Result Instantly: The indented markup appears automatically as you type.

  3. 3

    Copy the Result: Use the copy button to copy the readable XML.

How It Works

The document is scanned tag by tag: an opening tag increases the indentation depth for everything after it, a closing tag decreases it back, and a self-closing tag stays at the current level. Each line is then re-indented based on that running depth, turning a single-line or minified document into properly nested markup.

Example

Before
<note><to>Alice</to><text>Meeting at noon</text></note>
After
<note>
  <to>Alice</to>
  <text>Meeting at noon</text>
</note>

Each child element moves to its own line, indented one level inside its parent `<note>`.

Common Use Cases

Making a single-line SOAP response, a minified RSS feed, or a compressed config file readable before you review or edit it by hand. It's the kind of file that's compact in transit but painful to read that way.

FAQs

Frequently Asked Questions

Common questions about XML Prettify.

No, it re-indents based on tag structure but doesn't check for well-formedness issues beyond that. Use HTML Validator's balance-check approach as a rough proxy, or a dedicated XML validator for strict compliance checking.

Yes, use XML Minifier to strip whitespace back out.

Yes, Bytelify's XML Prettify tool is free with no account or sign-up required.

No. Formatting runs entirely client-side in your browser, so nothing you paste is sent anywhere.