---
title: "XML Formatter - Format XML for readability"
description: "Format XML strings for easier reading. It supports indentation changes and whitespace cleanup, which is useful for XML review and editing."
canonical_url: "https://web-toolbox.dev/en/tools/xml-formatter"
meta:
  author: K
  "og:description": "Format XML strings for easier reading. It supports indentation changes and whitespace cleanup, which is useful for XML review and editing."
  "og:image": "https://web-toolbox.dev/og/en/tools/xml-formatter-927fc1f1.png"
  "og:image:alt": "XML Formatter"
  "og:image:height": "630"
  "og:image:width": "1200"
  "og:title": "XML Formatter - Format XML for readability"
---

> Index of every page on this site: [llms.txt](https://web-toolbox.dev/llms.txt)

# **XML Formatter**

Format or minify XML

**Input**

**Result**

Read-only

## What is XML Formatter?

XML Formatter is a tool for making XML easier to read or compressing it by removing extra whitespace and line breaks. It is useful for API responses, configuration files, and XML data review.

Pasting XML shows the formatted result right away.

## How to Use

1. Enter your XML string.
2. Choose an indentation style.
3. Change the space count if needed.
4. Review the formatted XML in the result area.

If the XML is invalid, the tool shows an error message.

## Main Settings

### Indent

Choose spaces or tabs for readability. Choose None when you want compact XML in one line.

### Indent Spaces

You can change the space width. Wider spacing makes deeply nested XML easier to follow.

## Use Cases

- Making API XML responses easier to inspect
- Reviewing the structure of XML configuration data
- Preparing formatted XML for sharing or review
- Compressing XML into a single line when needed

**How was your experience?**

Last updated: March 29, 2022

### **Related Tools**

- [<h4>**JSON Formatter**</h4>](https://web-toolbox.dev/en/tools/json-formatter)
- [<h4>**SQL Formatter**</h4>](https://web-toolbox.dev/en/tools/sql-formatter)
- [<h4>**HTML Escape/Unescape**</h4>](https://web-toolbox.dev/en/tools/html-escape-unescape)
- [<h4>**JWT Decoder**</h4>](https://web-toolbox.dev/en/tools/jwt-decoder)
- [<h4>**Regex Checker**</h4>](https://web-toolbox.dev/en/tools/regex-checker)
- [<h4>**UUID Validator**</h4>](https://web-toolbox.dev/en/tools/uuid-validator)
- [<h4>**HTML Tag Remover**</h4>](https://web-toolbox.dev/en/tools/html-tag-remover)
- [<h4>**Line Break & Whitespace Remover**</h4>](https://web-toolbox.dev/en/tools/line-break-remover)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://web-toolbox.dev/en#website","@type":"WebSite","description":"アカウント登録不要で使える無料Web開発ツール80種類以上。JSON整形、Base64変換、カラーコード変換、QRコード生成などをブラウザ上で瞬時に実行。開発者の作業効率を大幅に向上させます。","inLanguage":"en-US","name":"Web ToolBox","url":"https://web-toolbox.dev/en","translationOfWork":{"@id":"https://web-toolbox.dev/#website"}},{"@id":"https://web-toolbox.dev/en/tools/xml-formatter#webpage","@type":"WebPage","description":"Format XML strings for easier reading. It supports indentation changes and whitespace cleanup, which is useful for XML review and editing.","name":"XML Formatter - Format XML for readability","url":"https://web-toolbox.dev/en/tools/xml-formatter","breadcrumb":{"@id":"https://web-toolbox.dev/en/tools/xml-formatter#breadcrumb"},"isPartOf":{"@id":"https://web-toolbox.dev/en#website"},"potentialAction":[{"@type":"ReadAction","target":["https://web-toolbox.dev/en/tools/xml-formatter"]}]},{"@id":"https://web-toolbox.dev/en/tools/xml-formatter#/schema/web-application/1","@type":"WebApplication","applicationCategory":"UtilityApplication","description":"Format XML strings for easier reading. It supports indentation changes and whitespace cleanup, which is useful for XML review and editing.","name":"XML Formatter - Format XML for readability","operatingSystem":"Windows, macOS, Linux, Android, iOS"},{"@id":"https://web-toolbox.dev/en/tools/xml-formatter#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://web-toolbox.dev/en","position":1},{"@type":"ListItem","name":"Code","item":"https://web-toolbox.dev/en/categories/code","position":2},{"@type":"ListItem","name":"XML Formatter","item":"https://web-toolbox.dev/en/tools/xml-formatter","position":3}]}]}
```

## Sitemap

See the full [sitemap](https://web-toolbox.dev/sitemap.md) for all pages.
