# Formateur XML

> Formatez le XML fourni sans résoudre les entités externes.

[Open tool](https://www.toolcabana.com/fr/xml-formatter) · [Développement et données](https://www.toolcabana.com/fr/category/developer-and-data)

Tool ID: xml-formatter. Requested language: fr. Description language: fr. 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 (fr)

Formatez le XML fourni sans résoudre les entités externes.

## Steps (fr)

1. Collez la source dans l'éditeur de saisie ou chargez l'exemple intégré.
2. Définissez les espaces d'indentation.
3. Lancez le formateur XML, vérifiez le résultat, puis utilisez les commandes de copie ou de téléchargement disponibles.

## Settings

- Espaces d'indentation (fr; key: indent; type: number); minimum: 1; maximum: 8

## Limitations (fr)

Les opérations sur texte acceptent généralement jusqu'à 2 000 000 caractères. Les analyseurs, générateurs et formules individuels appliquent des limites supplémentaires indiquées par leurs contrôles.

## Example input

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

## Privacy and connections (fr)

Cette opération traite sa source dans votre navigateur. La copie et le téléchargement sont des actions explicites ; la saisie source n'est enregistrée ni dans un compte ni dans l'historique.

## Questions (fr)

### 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.

### Où ma saisie est-elle traitée ?

Cette opération traite sa source dans votre navigateur. La copie et le téléchargement sont des actions explicites ; la saisie source n'est enregistrée ni dans un compte ni dans l'historique.

### Quelles sont les limites de saisie ?

Les opérations sur texte acceptent généralement jusqu'à 2 000 000 caractères. Les analyseurs, générateurs et formules individuels appliquent des limites supplémentaires indiquées par leurs contrôles.

## Related tools

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