XML Formatter & Validator – Pretty Print XML
NOVOXML formatter that pretty-prints or minifies XML and validates it, showing the line and column of any error. Keeps CDATA, comments and PIs. Free, in-browser.
Funciona 100% no seu navegador — o que você insere nunca é enviado nem armazenado nos nossos servidores.
Esta ferramenta ainda não está totalmente traduzida, por isso parte do texto continua em inglês. A ferramenta funciona da mesma forma em todos os idiomas.
Exemplos rápidos
Entradas típicas e os resultados que esta ferramenta gera.
Visão geral
This XML formatter indents a document so its structure is easy to read, or minifies it into a single line by dropping whitespace between elements. At the same time it checks that the XML is well-formed and tells you exactly where it breaks: a mismatched closing tag, an unquoted attribute, a bare & or a second root element.
Developers paste SOAP responses, RSS and sitemap files, Android layouts, Maven POMs or product feeds to inspect them. CDATA sections, comments, processing instructions and the XML declaration are kept, text-only elements stay on one line, and elements with mixed text or xml:space="preserve" are left untouched so meaningful whitespace survives.
Validation runs twice in your browser: a strict built-in parser gives precise line and column numbers, and the browser’s own XML parser double-checks namespaces. Nothing is uploaded.
Por que usar esta ferramenta?
- Pretty print and validate XML in one step
- Exact line and column for every syntax error
- Keeps CDATA, comments and processing instructions
- Minify feeds and payloads for transport
- Runs locally, your XML stays private
Recursos
Pretty print
Indents nested elements with 2 spaces, 4 spaces or tabs.
Minify
Removes whitespace between elements and, optionally, all comments.
Well-formedness check
Catches mismatched or unclosed tags, unquoted attributes, duplicate attributes, bad entities and extra root elements.
Line and column
Every error message points to the exact position in your input.
Lossless details
CDATA, comments, processing instructions, DOCTYPE and mixed content are preserved.
Copy or download
Copy the output or save it as an .xml file.
Como usar
Paste XML
Paste your document into the XML input box or press Sample.
Choose the mode
Pick Pretty print or Minify, then the indent and comment options.
Fix any errors
If the XML is invalid, the red message shows the line and column to fix.
Copy the result
Press Copy or Download to use the formatted XML.