JSON to XML Converter
Generate well-formed XML from JSON with a configurable root element, optional XML declaration, and pretty indentation. Useful for SOAP payloads, RSS drafts, and legacy systems.
工具摘要
此工具接收结构化输入,在浏览器中返回确定性输出,无需上传到服务器。
- 工具名称
- JSON to XML Converter
- 输入意图
- 提供需要转换、校验或分析的原始内容。
- 输出意图
- 获得可直接复制、复用或排错的规范化输出。
- 示例输入
- {"book":{"title":"Dune","author":"Frank Herbert","year":1965}}
- 示例输出
- <?xml version="1.0" encoding="UTF-8"?> <book> <title>Dune</title> <author>Frank Herbert</author> <year>1965</year> </book>
Paste JSON above and click Convert to XML.
工具介绍
Generate well-formed XML from JSON with a configurable root element, optional XML declaration, and pretty indentation. Useful for SOAP payloads, RSS drafts, and legacy systems.
工具概览
Each JSON key becomes an element; strings, numbers, and booleans become text content (XML-escaped). Arrays expand into repeated sibling elements with the same name. The top-level element defaults to `<root>`, but if your JSON has a single top-level key whose value is an object, that key is used as the root element instead — so the output stays natural.
使用场景
- Build a SOAP request body from a JSON fixture
- Draft an RSS/Atom feed item from structured data
- Feed legacy enterprise systems that require XML
- Produce XML sitemaps from a JSON content list
输入/输出示例
{"book":{"title":"Dune","author":"Frank Herbert","year":1965}}<?xml version="1.0" encoding="UTF-8"?> <book> <title>Dune</title> <author>Frank Herbert</author> <year>1965</year> </book>
{"library":{"book":[{"title":"Dune"},{"title":"Foundation"}]}}<?xml version="1.0" encoding="UTF-8"?>
<library>
<book>
<title>Dune</title>
</book>
<book>
<title>Foundation</title>
</book>
</library>{"response":{"status":"ok","items":[1,2,3],"empty":null}}<?xml version="1.0" encoding="UTF-8"?> <response> <status>ok</status> <items>1</items> <items>2</items> <items>3</items> <empty/> </response>
常见问题
Is this JSON to XML converter free?+
How are arrays represented?+
How are special characters escaped?+
Can I skip the XML declaration?+
Can I generate XML for SOAP, RSS, or sitemaps?+
探索更多工具
在下方的 Data 分类中发现相关工具。
相关工具
精选可能对你有用的实用工具