Omnikit
DevFilesMoneyAll tools
Ctrl K
Dev toolsFile toolsMoney calculatorsAll tools
HomeDeveloper toolsXML Formatter & Validator
EnglishالعربيةবাংলাDeutschEspañolFrançaisPolskiPortuguêsРусский

XML Formatter & Validator

dev

Indent XML, minify it, and see the first error by line and column

Runs in your browser. Nothing you type is sent anywhere. Updated on 24 Oct 2026.

Formatting XML indents nested elements so the hierarchy becomes visible, and minifying strips that whitespace out again. A malformed document is reported by line and column, so you go straight to line 47 instead of hunting. Everything is parsed in your browser.

Next:
  • JSON Formatter & Validator Format, validate, minify and sort JSON with exact error positions
  • HTML Formatter & Minifier Indent messy HTML, or minify it and see the bytes you saved

How to format, minify and validate XML

1

Paste the document into the XML box, or press Try an example.

2

Pick Format to indent it, Minify to strip the indentation, or Validate to check it is well formed.

3

If the document is broken, read the line, column and hint under the box and fix that spot.

4

Press Copy or Download to take the formatted or minified XML.

About the XML Formatter & Validator

This XML formatter does three jobs from one box. Format indents the document as a tree, one element per line, at two spaces, four spaces or a tab. Validate checks that the document is well formed and, when it is not, gives you the first real problem with its line and column. Minify strips the indentation and, if you want, the comments, and shows the bytes saved.

XML tends to arrive in an awkward state. A SOAP response or an API payload is one line thousands of characters long. A feed from a partner is rejected by your importer with nothing more than "invalid XML". A config file has been edited by three people and no longer lines up. All three are a paste away from readable here.

The validator checks what XML actually requires: one root element, every tag closed by its own name in the right order, attribute values in quotes and never set twice, ampersands written as entities, and nothing but whitespace and comments outside the root. Messages say what to change, such as which element was opened earlier and has to be closed first. It does not check against a DTD or an XSD schema; it checks that the document is well formed, which is the failure people actually hit.

Minifying removes only whitespace that sits between elements, because in XML the text inside an element is data. Text with content in it, along with CDATA sections, is copied character for character. Everything runs in your browser, so payloads with customer records in them never leave your device.

Frequently asked questions

Is this XML formatter free?

Yes. No signup, no document size limit and no cap on how often you use it. The page is paid for by a few ads shown outside the tool, and nothing is added to your document.

Is my XML sent to a server?

No. Formatting, validating and minifying all run in your browser with JavaScript. A payload containing customer records, order numbers or an internal endpoint never leaves your device and is not stored anywhere.

How do I find out where my XML is invalid?

Paste it and the first problem is shown with its line and column, next to the input. Typical answers are a tag closed by the wrong name, an attribute value missing its quote, a bare ampersand that should be &, or a second root element.

Does it validate against a DTD or an XSD schema?

No. It checks that the document is well formed: one root, correctly nested and closed tags, quoted attributes and valid entities. Schema validation needs the schema itself and is a different job. Well-formedness is what most rejected files actually fail.

Will minifying XML change my data?

No. Only whitespace between elements is removed, because that is indentation a formatter added. Text inside an element is the data, so it is copied exactly, and CDATA sections are left untouched. Comments are removed unless you keep them.

Can it format a SOAP response or an RSS feed?

Yes. Both are ordinary XML. Paste the whole response, including the XML declaration, and it comes back as an indented tree. Namespace prefixes such as soap: and content: are element names like any other and are preserved.

Still stuck? Ask about XML Formatter & Validator and anybody who knows can answer. No account needed.

Common uses

  • XML ValidatorCheck XML is well formed and see exactly where it breaks
  • XML MinifierStrip the indentation from XML without touching the data

Same job, other tools: GraphQL Validator – Check a GraphQL query or schema for errors, optionally against your own SDL · JSON Validator – Check JSON and see exactly where it breaks · JSON Minifier – Strip whitespace from JSON for production · HTML Minifier – Strip comments and spare whitespace from HTML and see the saving · CSS Minifier – Compress a stylesheet and see exactly how many bytes you saved.

On the related tools: Markdown to HTML – Convert Markdown into clean, safe HTML you can paste anywhere.

Also works as: XML Beautifier.

Related tools

All developer tools
Hex Viewer (xxd online)See any file as an xxd hex dump with offsets and text, or turn a hex dump back into a fileGraphQL FormatterFormat, minify and validate GraphQL queries and schemas, with errors by line and columnJSONL Viewer and ValidatorCheck JSON Lines and NDJSON line by line, view records as a table, convert to a JSON arrayJSON Formatter & ValidatorFormat, validate, minify and sort JSON with exact error positionsSQL FormatterFormat and beautify SQL for PostgreSQL, MySQL, SQL Server and moreMarkdown PreviewWrite Markdown and see it rendered live, with tables, task lists and codeHTML Formatter & MinifierIndent messy HTML, or minify it and see the bytes you savedCSS Beautifier & MinifierTidy a stylesheet or minify it, with the size saved shown

In the collection Code Formatters and Minifiers.

Was this tool helpful?
Omnikit

Small jobs, done in your browser. Free, fast and private. Files are never uploaded.

Files

  • Compress Image
  • Image to PDF
  • Merge PDF
  • Compress PDF
  • PDF to Word
  • Word to PDF

Dev

  • JSON Formatter & Validator
  • Base64 Encode & Decode
  • JWT Decoder, Verifier & Encoder
  • Password Generator
  • UUID Generator
  • Unix Timestamp Converter

Money

  • SIP Calculator
  • EMI Calculator
  • GST Calculator
  • FD Calculator
  • PPF Calculator
  • Lumpsum Calculator
EnglishالعربيةবাংলাDeutschEspañolFrançaisPolskiPortuguêsРусский
GuidesQuestionsAboutHow we checkLaw library (beta)PrivacyTermsDisclosureContactMore: Exam practice (UGC NET Paper 1)Runs in your browser. Nothing is uploaded. © 2026 Omnikit (theomnikit.com)