How to use
- Enter your XML string.
- Click "Format".
- You'll see the result indented to match its tag structure.
๐ฏ Use Cases
- Turn a minified XML response into a readable form
- Check the structure of config files (pom.xml, etc.)
- Debug an XML API response
Example
Input
<config><host>localhost</host><debug enabled="true"/></config>
Output
<config>
<host>
localhost
</host>
<debug enabled="true"/>
</config>A one-line minified XML string is indented by two spaces per level to match its tag hierarchy. Text inside an element moves to its own line, and empty (self-closing) tags are kept exactly as written.
FAQ
- Are CDATA sections handled correctly?
- Yes. CDATA sections are preserved exactly as-is, so their inner content is never restructured.
- Can it format invalid (non-well-formed) XML too?
- XML that isn't well-formed, such as mismatched tags, may be indented differently than expected. Check the original structure first.
- Is the content I enter sent to a server?
- No. It's processed entirely in your browser.
More Coding Tools
๐
JSON Formatter
Prettify, validate & minify JSON
๐๏ธ
Timestamp Converter
Convert Unix timestamp โ date
๐งฉ
JSON String Encoder
Convert text โ JSON string literal
โจ
JS/CSS Formatter
Indent & tidy JS/CSS code
โ๏ธ
JS/CSS Minifier
Strip comments & whitespace
๐งฝ
HTML Formatter
Indent HTML by tag structure
๐๏ธ
SQL Formatter
Break SQL into clauses & indent
๐ฃ
HTML Entity Encoder
Convert special chars โ HTML entities
๐
Excel to HTML Table
Convert spreadsheet data to HTML TABLE
โ๏ธ
Link Extractor
Extract href/src links from HTML
๐จ
Color Picker
Get HEX, RGB & HSL color codes
๐
PHP Syntax Checker
Check bracket/string pairing (practical checker)
๐๏ธ
MySQL Syntax Checker
Check bracket/quote pairing (practical checker)
๐
HTML5 Validator
Check tag pairing, duplicate id, missing alt
โ๏ธ
Online HTML Editor
Write & edit HTML visually