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.