Code & Data
Format XML and check it is well formed
Paste XML to indent it. It is parsed properly first, so you also find out whether it is well formed — and if it is not, which line broke it.
Well-formedness is checked — tags must nest and close — but no DTD or schema is consulted. CDATA sections and attribute values containing angle brackets are handled correctly.
Paste XML above and the result appears here.
- Runs in your browser
- No account required
- Free to use
How it works
Parsed, not pattern-matched
`<a title="a>b">` and `<![CDATA[</x>]]>` both contain angle brackets that are not markup. A formatter built on regular expressions mangles both. This one tracks quotes and CDATA sections, so it always knows whether a bracket is a tag.
Well-formed, not valid
Tags must nest and close, entities must be legal, and there must be a root element. No DTD or schema is consulted — that is validity, a different question, and well-formedness is what a formatter actually needs to do its job.
Text-only elements stay on one line
`<title>Dune</title>` is not improved by being spread across three lines, and for elements where whitespace matters it is not even equivalent. Only elements with element children get broken open.
What it does
Errors with a line number
An unclosed tag, a mismatched closing tag or an unterminated comment is reported with the line it starts on.
CDATA preserved exactly
Contents are literal by definition, so they are copied through untouched — entities inside CDATA are not entities.
Declarations and comments kept
The XML declaration and processing instructions survive. Comments are kept by default and can be dropped.
Nothing is uploaded
Parsed in your browser and never uploaded — which matters for a feed, an export or a config file.
Practical advice
Getting a better result
- If the error points at the end of the file, the real problem is usually an unclosed tag much earlier — that is where the parser ran out, not where the mistake is.
- Formatting twice should produce identical output. If it does not, that is worth reporting.
- XML is case-sensitive: `<Item>` and `<item>` are different elements, and a mismatch between them is a common cause of "never closed".
Questions
Things people ask
Does it validate against a schema?
No. It checks well-formedness — that the document is structurally legal XML — which is what formatting requires. Validating against a DTD, XSD or RelaxNG schema is a separate job and needs the schema.
Will it break my CDATA?
No. CDATA sections are recognised before anything else and copied through byte for byte, including any angle brackets and ampersands inside them.
Related tools
JSON Formatter
Format and minify JSON, with errors that name the line.
Runs entirely in your browser
Open toolJSON Validator
Check JSON and get the line, column and cause of any error.
Runs entirely in your browser
Open toolJSON Viewer
Explore JSON as a collapsible tree instead of scrolling it.
Runs entirely in your browser
Open toolJSON to CSV
Turn an array of objects into a spreadsheet-ready CSV.
Runs entirely in your browser
Open toolWho builds these
Free tools by day. Websites that earn their keep by trade.
KuConvert is built by KUDUY, a web design and development agency. From custom WordPress builds to SEO and e-commerce, everything they do is engineered to bring you more qualified traffic and turn it into revenue.
Web Design
Custom, conversion-focused web design that captivates visitors and turns them into paying customers. Mobile-first, fast, and built to rank.
Web Development
Custom WordPress websites built with clean code, blazing-fast performance (Core Web Vitals optimised), and enterprise-grade security.
E-Commerce
Online stores that convert visitors to customers with seamless shopping experiences.
SEO
Technical SEO, keyword research, on-page optimisation and local SEO strategies that drive qualified organic traffic.
Digital Marketing
Data-driven campaigns that deliver measurable ROI across every channel.
Branding
Memorable brand identities that stand out in any market and build lasting trust.
Website Help
One-on-one expert support for bug fixes, updates and ongoing maintenance — without a long-term retainer.
Fixed scope, no surprise invoices
Most sites ship in four to eight weeks with the scope and the price agreed up front.
SEO from day one
Search is designed into the build — structure, schema and Core Web Vitals — not retrofitted.
A team, not a ticket queue
A project manager, a designer and a developer you can actually reach.
Need your whole site to load this fast?
Images are usually the heaviest thing on a page and the easiest win. KUDUY works on site speed, image delivery and Core Web Vitals for teams who would rather not do it by hand.
This tool runs entirely in your browser. Your files are never uploaded.