Monu Tools

XMLフォーマッター

XMLを適切なインデントで見やすく整形するか、1行にミニファイします。コメント・CDATA・処理命令は保持されます。

XMLフォーマッターの使い方

  1. 01

    入力欄にXMLを貼り付けます。

  2. 02

    「整形」でインデントするか、「ミニファイ」で圧縮するかを選択します。

  3. 03

    インデント幅を選び、結果をコピーします。

What the XML formatter does

This is an XML formatter that beautifies a document with proper, depth-based indentation, or minifies it to a single line. It preserves comments, CDATA sections, processing instructions and the XML declaration.

Formatting runs entirely in your browser, so your data never leaves your device, which makes it safe even for XML that contains sensitive values.

Why readable XML helps

XML is verbose and deeply nested. Indenting each element by its depth and putting tags on their own lines turns a wall of angle brackets into a structure you can actually follow.

It is useful across the many places XML still lives: SOAP responses, RSS feeds, build and config files, and document formats, where a quick reformat makes debugging far easier.

Beautify and minify behavior

Beautifying keeps a single text child inline with its tags, so simple values stay compact, while the declaration, comments and CDATA are kept exactly as they were rather than being reflowed or dropped.

Minifying removes comments and the whitespace used only for indentation between tags. Text content and CDATA are kept exactly, so it is safe unless your document relies on significant whitespace in mixed content.

It reformats, it does not validate

The tool reformats for readability and does not validate against a schema. Clean layout does not mean the document matches any DTD or XSD you expect.

よくある質問

XMLの整形とは何をしますか?

各要素をネストの深さに応じてインデントし、タグを独自の行に配置します。テキストコンテンツが1つだけの場合はインライン表示します。コメント・CDATA・XML宣言は保持されます。

XMLのミニファイは安全ですか?

タグ間のインデント用空白とコメントを削除します。テキストコンテンツとCDATAセクションはそのまま保持されるため、混合コンテントの有意な空白に依存していない限り安全です。

XMLはどこかに送信されますか?

いいえ。整形はブラウザ内で完結するため、データがデバイスの外に出ることはありません。機密性の高いXMLでも安全です。

出典

このツールを埋め込む

このツールをご自身のウェブサイトに追加できます。下のコードをコピーしてください。内容は自動的に最新の状態に保たれます。

<iframe src="https://monu.tools/embed/ja/xml-formatter" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>

関連ツール