About XML Formatter

A small, single-purpose site: free browser tools for formatting, checking and minifying XML. No accounts, no uploads, no tracking scripts.

By the XML Formatter team · Updated · About this siteEverything runs in your browser — no uploads, no cookies, no tracking.

0 B
Result—

Runs 100% in your browser · 2 MB limit · Ctrl/⌘ + Enter to run

XML Formatter is a small, single-purpose website: free browser tools for formatting, checking and minifying XML. There are 0 accounts, 0 uploads and 0 tracking scripts. The site exists because the alternatives are usually either heavyweight desktop tools or online formatters that quietly post your document to a server.

7 pages, 3 tools, 2 languages: the tools are meant to do 3 jobs well — pretty-print XML, explain exactly why a document is malformed, and strip whitespace when you need a smaller file — and to leave everything else alone.

How the tools work

Formatting, validation and minification all run on 1 custom XML tokenizer and parser. It is plain JavaScript, delivered as 2 local files with the page: there is no framework, 0 CDN calls, 0 third-party libraries and no server component. That choice has a cost — the parser is maintained here rather than imported — and a benefit: every error message is consistent across browsers and always includes a line and a column.

The formatter is content-preserving: element names, attribute values, text content, comments, CDATA sections, processing instructions and entity references are copied exactly; only indentation and the spacing between attributes are normalised. Running the formatter twice produces 0 byte changes.

What the site actually ships, in numbers.
ItemValue
Engine sourcexml-core.js — 31,592 bytes of plain JavaScript
UI sourcetool.js — 24,135 bytes, English and German strings
Styles1 stylesheet — 18,385 bytes, system fonts only
Network calls during any action0
Cookies / local storage keys0 / 0
Third-party scripts0
Pages7, in 2 languages
XML input cap2,097,152 bytes (2 MiB)
Nesting / element guards2,000 levels / 150,000 elements

How the tools are tested

Every release is checked by an automated harness before it ships. The engine suite makes 48 assertions: formatting is idempotent, mixed content such as <p>Hello <b>world</b>!</p> is preserved exactly, and formatting → minifying → formatting returns the same output. It also feeds 300 randomly generated malformed documents to the parser and requires 0 throws, refuses a 2.06 MB input in about 1 ms, and formats 531 KB in 106 ms.

The page layer adds more than 400 automated assertions across the 7 pages: 1 unique H1 per page, title and description limits, canonical URLs, JSON-LD parsing, internal-link matrix and 0 broken links. A regression snapshot additionally compares the keyword fields before and after each change: title, H1, description, canonical, JSON-LD, navigation and internal links are checked field by field.

The error-reporting tests use deliberately broken documents — a mismatched closing tag, an unquoted attribute value and an unescaped ampersand among them — and assert the exact line and column of each reported error, for example Line 9, Column 5 and Line 2, Column 13. The same engine runs in the browser, so these tests exercise the code you actually use.

Editorial and correction policy

The written guidance aims to be accurate and specific: what the parser does, what it refuses to do, and which problems it cannot solve. Where a limitation exists — 0 schema validation, no namespace resolution, a 2 MiB cap — it is stated on the page rather than left for you to discover at the moment you need it.

If you find a factual error, a confusing error message, or a case where the formatter changes a document it should not, email us with the browser you used and the smallest sample that reproduces the issue. Corrections that change a page are reflected in its visible “last updated” date. This site has 0 affiliate links, 0 sponsored content and 0 advertising inside the tools.

Who maintains this site

XML Formatter is maintained by a small independent team of web developers who work with XML configuration, integration payloads and build systems day to day. The site is self-funded and free; it does not take investment, run ads in the editors or plan to introduce accounts. The tools are deliberately narrow because narrow tools are easier to keep correct.

Contact: [email protected]. We read every message and usually reply within a few working days.

Frequently asked questions

Who runs XML Formatter?

An independent team of web developers who work with XML configuration, integration payloads and build systems. The site is self-funded and free; it has no accounts, no advertising inside the tools and no investment.

Can I report a bug or suggest a feature?

Yes — email [email protected] with the browser you used and the smallest sample that reproduces the problem. Please do not send sensitive XML; a minimal sample is enough.

Do you accept advertising or paid placements?

No. The site loads no advertising, affiliate or sponsored scripts, and the tools contain no placements. Pages are written to be useful, not to sell anything.

How often is the site updated?

When the parser changes or a meaningful correction is made. Every page shows a visible last-updated date, and corrections that change guidance are reflected there.

Related XML tools