Toolvist

Formateador y embellecedor XML

Formatea y embellece XML con la indentación correcta, o valídalo y salta directamente a la línea del error. Formateador XML online, sin registro ni subidas.

Formateador y embellecedor XML online y gratuito

El formateador XML muestra el XML con una sangría clara para que sea fácil de leer y depurar. Gestiona elementos anidados, etiquetas de cierre automático, comentarios e instrucciones de procesamiento.

XML that needs to become data is handled by the XML to JSON Converter, and its endpoints can be inspected with the HTTP Header Checker. For the HTML equivalent, the HTML Formatter & Beautifier is the sibling.

Cómo usar Formateador XML

  1. 1 Paste your XML into the input pane.
  2. 2 Press Format. Each element moves to its own line, indented by nesting depth.
  3. 3 Read the error message if one appears — it names the line where the structure broke.
  4. 4 Copy the indented result, or switch to minify to collapse it again for transport.

Cómo usarlo

Pega tu XML y pulsa Formatear. El XML indentado y legible aparece a la derecha.

  • Indenta los elementos según su profundidad
  • Conserva comentarios y etiquetas de cierre automático
  • Funciona íntegramente en tu navegador

Preguntas frecuentes

Why does the formatter complain about a file my application accepts?

XML has one root element. A file with two top-level elements, or with text outside the root, is not well-formed even if some parsers are forgiving. The formatter applies the specification strictly, which is why it can reject markup that a lenient reader tolerates.

Does formatting preserve comments and CDATA?

Yes. Comments, processing instructions and CDATA sections are treated as content and re-emitted where they were, not stripped. Only the whitespace between tags is rewritten. CDATA bodies are copied byte for byte, so a block of embedded markup inside them is not re-indented.

Why does my formatted file get bigger?

Indentation is real bytes. A deeply nested document can grow by a third. That is the correct trade for a file a human reads and the wrong one for a file a machine parses, so format for review and keep the compact form for the wire.

Herramientas para desarrolladores relacionadas

Ver todo en Herramientas para desarrolladores →

También te puede interesar

Herramientas de otras categorías que suelen combinarse con Formateador XML:

Explorar el directorio completo →