XML フォーマッター
「XML フォーマッター」はコード、データと QRに使えるブラウザツールです。入力内容と結果は通常この端末内で処理され、登録は必要ありません。
使い方
使い方
- Paste XML and choose pretty print or compact output.
- Select two spaces, four spaces, or tabs, then format the document.
- Review the validated result, copy it, or download an XML file.
Validated in your browser
The formatter uses the browser XML parser before producing output. It does not fetch external entities, resolve URLs, or send your XML to a server. Parser errors include a line and column when the browser exposes them.
Boundaries stay visible
XML declarations, processing instructions, comments, CDATA sections, doctypes, and text are handled as separate tokens. CDATA content is kept as CDATA instead of being escaped into ordinary text.
Readable or compact output
Pretty print uses your selected indentation and keeps mixed text content on one line where possible. Compact output removes formatting whitespace between markup while preserving meaningful text, comments, and CDATA.
よくある質問
あわせて知りたいこと
Is my XML uploaded?
No. Parsing, formatting, copying, and download preparation happen locally in your browser.
Can I preserve comments and CDATA?
Yes. Valid comments and CDATA sections remain in the output with their boundaries intact.
What happens when XML is invalid?
The result is not generated. The page reports the parser message and line or column when available.
Does compact mode change text?
It removes formatting whitespace between tags, while preserving text nodes, comments, CDATA, declarations, and processing instructions.