XML ⇄ JSON

Convert between XML and JSON, preserving attributes and text nodes

XML ⇄ JSON is a free online Files & Docs tool. Convert between XML and JSON, preserving attributes and text nodes Related terms: xml · json · 转换 · convert · 解析 · parse. Use it on this page without signing in.

XMLJSONXML 转 JSON
输出(JSON
点击「转换」查看结果

转换约定:XML 属性以 @ 前缀表示,文本内容以 #text 表示,重复标签自动合并为数组。全程浏览器本地处理。

Help

使用说明

  1. 粘贴 XML 或 JSON 内容
  2. 选择转换方向:XML 转 JSON 或 JSON 转 XML
  3. 属性以 @ 前缀表示,文本内容以 text 表示
  4. 转换结果实时显示,一键复制

常见问题

  • 数据会上传吗? 全程浏览器本地解析转换,不发送任何数据
  • 属性怎么处理? XML 属性转为 @attr 键,重复文本节点转为数组
  • 转换失败? 请检查 XML 标签闭合与 JSON 语法是否合法

More Files & Docs

View all

FAQ about XML ⇄ JSON

What can XML ⇄ JSON do?

XML ⇄ JSON is a Files & Docs tool. Convert between XML and JSON, preserving attributes and text nodes You can finish the job on this page.

Who should use XML ⇄ JSON?

Anyone handling xml · json · 转换 · convert · 解析 · parse who does not want to install desktop software can use XML ⇄ JSON in the browser.

Is XML ⇄ JSON safe? Is my data uploaded?

This tool runs in your browser. We do not collect the content you enter into XML ⇄ JSON just because you used it.

What similar tools exist?

Related tools in the same Files & Docs group are listed at the bottom of this page.