Formatador XML
Format, validate and minify XML documents
100% gratuito. Funciona totalmente no seu navegador: seus arquivos e dados nunca saem do seu dispositivo e nada é enviado para nenhum servidor.
Sobre esta ferramenta
XML is still everywhere JSON never displaced it - SOAP APIs, RSS feeds, sitemaps, Office document internals, Android layouts, Maven builds, bank and government data exchange. And like JSON, it usually arrives as one dense line, because whitespace between elements costs bandwidth and parsers do not need it. Formatting restores the indentation so the nesting becomes visible. Validation answers a different question: whether the document is well-formed, meaning every tag is closed, elements nest properly rather than overlapping, attribute values are quoted and special characters are escaped. That last one causes more real failures than anything else - a raw ampersand or angle bracket in text content makes an otherwise perfect document unparseable, and the error message points at a position rather than explaining the cause. Note that well-formed is not the same as valid against a schema; this checks structure, not whether your document matches a particular XSD. Everything runs in your browser.
Como usar esta ferramenta
- Paste your XMLAn API response, feed, config file or export - minified or already indented, it does not matter.
- Format itThe document is re-indented so the element hierarchy is readable at a glance.
- Check the validation resultErrors are reported with position. Unclosed tags and unescaped ampersands are the two most common causes.
- Copy or minifyTake the readable version for debugging, or minify back to one line for transmission.
Por que usar
- Makes deeply nested documents readable, which is the only practical way to navigate them.
- Catches well-formedness errors with their position, rather than a parser failing silently downstream.
- Minifies as well as formats, so the same tool covers both debugging and shipping.
- Runs in your browser - API responses containing customer data are never transmitted.
- No account and no document size limit.
Usos comuns
- Reading a SOAP response while debugging an integration.
- Checking an RSS or XML sitemap before publishing it.
- Inspecting configuration files - Maven, Android layouts, .NET config.
- Validating an XML export before sending it to a partner system that will reject malformed input.
- Understanding an unfamiliar XML structure by making its hierarchy visible.
Dicas para melhores resultados
- Escape the five reserved characters in text content: & becomes &, < becomes <, > becomes >, and quotes become " and '.
- An unescaped ampersand is the single most common cause of invalid XML - check for it first when a document will not parse.
- XML is case-sensitive, so <Item> and <item> are different elements and will not close each other.
- Every document needs exactly one root element. Two top-level elements is invalid, however tempting it looks.
- For content containing markup or special characters, a CDATA section avoids escaping every character by hand.
Erros a evitar
- Leaving a raw & in text content, which invalidates the whole document.
- Overlapping tags rather than nesting them - <b><i>text</b></i> is invalid, even though HTML browsers tolerate it.
- Assuming a well-formed document is also schema-valid. Structure and schema conformance are separate checks.
- Forgetting that XML is case-sensitive, unlike HTML, so a mismatched tag case fails to close.
- Adding a second root element, which no XML parser will accept.
Formatos compatíveis
- XML
Opções disponíveis
- Format
- Validate
- Minify
Perguntas frequentes
Paste your document above. It is re-indented for readability and checked for well-formedness, with any error reported alongside its position.
Yes. No account, no size limit and nothing uploaded.
That the document follows XML's structural rules: every tag closed, elements properly nested, attribute values quoted, special characters escaped, and exactly one root element. A well-formed document can be parsed - whether it is correct for its purpose is a separate question.
No. Only whitespace between elements changes. Element names, attributes and text content are untouched.
Most often an unescaped & in text content, which must be written as &. After that: a mismatched tag case, overlapping rather than nested tags, or an unquoted attribute value.
No - it checks well-formedness, not conformance to a specific schema. Schema validation needs the XSD itself and a dedicated validator.
Wrapping text that contains characters which would otherwise need escaping - embedded HTML, code samples, anything full of angle brackets. Everything inside is treated as literal text rather than markup.
No. Parsing and formatting happen in your browser, which matters because XML payloads frequently contain customer records and transaction data.
As pessoas também pesquisam
- xml formatter online free
- xml validator well formed
- xml beautifier
- pretty print xml
- xml syntax checker
- fix invalid xml
- xml to json converter