# Formatador de XML

> Formata o XML dado sem resolver entidades externas.

[Open tool](https://www.toolcabana.com/pt-br/xml-formatter) · [Desenvolvimento e dados](https://www.toolcabana.com/pt-br/category/developer-and-data)

Tool ID: xml-formatter. Requested language: pt-BR. Description language: pt-BR. Complete guide translation: yes.

## Overview (en)

XML formatter checks supplied XML for well-formedness and reformats the markup with consistent indentation from 1 to 8 spaces. Syntax problems are reported with a line number. DOCTYPE and entity declarations are refused, so no external entities are ever resolved during formatting.

## Supported tasks (pt-BR)

Formata o XML dado sem resolver entidades externas.

## Steps (pt-BR)

1. Cole a fonte no editor de entrada ou carregue o exemplo integrado.
2. Configure os espaços de indentação.
3. Execute o formatador de XML, revise a saída e use os controles disponíveis para copiar ou baixar.

## Settings

- Espaços de indentação (pt-BR; key: indent; type: number); minimum: 1; maximum: 8

## Limitations (pt-BR)

As operações de texto aceitam geralmente até 2,000,000 caracteres. Analisadores, geradores e fórmulas individuais aplicam limites adicionais mostrados pelos seus controles.

## Example input

```text
<root><name>ToolCabana</name><count>2</count></root>
```

## Privacy and connections (pt-BR)

Esta operação processa sua fonte no seu navegador. Copiar e baixar são ações explícitas; a entrada de origem não é salva em conta nem em histórico.

## Questions (pt-BR)

### Why does the XML formatter reject my DOCTYPE?

Documents containing DOCTYPE or ENTITY declarations are refused with an error. Remove the declaration to format the remaining markup; this prevents external or expanding entities from being processed.

### How does the XML formatter report errors?

The XML is validated before formatting. If it is not well-formed, such as an unclosed tag, you get the line number and a description of the problem instead of formatted output.

### Can I change the indentation of formatted XML?

Yes. The Indent spaces setting accepts whole numbers from 1 to 8, with 2 as the default. Short elements that fit on one line may be kept on a single line.

### Onde minha entrada é processada?

Esta operação processa sua fonte no seu navegador. Copiar e baixar são ações explícitas; a entrada de origem não é salva em conta nem em histórico.

### Quais são os limites de entrada?

As operações de texto aceitam geralmente até 2,000,000 caracteres. Analisadores, geradores e fórmulas individuais aplicam limites adicionais mostrados pelos seus controles.

## Related tools

- [XML to JSON](https://www.toolcabana.com/pt-br/xml-to-json)
- [SQL formatter](https://www.toolcabana.com/pt-br/sql-formatter)
- [HTML beautifier](https://www.toolcabana.com/pt-br/html-formatter)
- [CSS beautifier minifier](https://www.toolcabana.com/pt-br/css-formatter)
