Chuyển JSON sang XML và XML trở lại JSON, theo cả hai chiều, hoàn toàn trong trình duyệt của bạn.
Cách dùng JSON / XML
Chọn một chiều: JSON sang XML hoặc XML sang JSON.
Dán JSON hoặc XML của bạn.
Sao chép kết quả đã chuyển, hoặc hoán đổi để chuyển lại.
A two-way converter between JSON and XML, built on a well-tested parser. Convert a JSON object into XML or parse XML back into JSON, preserving attributes and turning repeated elements into arrays and back again.
It is handy whenever you need to bridge an XML-based system and a JSON-based one, inspect a SOAP payload as readable JSON, or turn a JSON config into the XML a legacy tool expects.
Everything runs locally in your browser, so your data never leaves your device.
XML (Extensible Markup Language) is a long-established way to structure data with nested tags and attributes. It is still everywhere: SOAP web services, RSS and Atom feeds, office document formats, Android layouts and countless configuration and data-exchange formats.
Attributes are preserved across the round trip using an @_ prefix on the JSON side, so an XML attribute becomes a clearly marked JSON key and converts back into the same attribute, rather than being lost or confused with child elements.
Repeated elements map naturally to arrays: several <item> tags under a parent become a JSON array, and a JSON array becomes repeated elements in the XML, which is the shape most real documents take.
Câu hỏi thường gặp
Các thuộc tính được giữ bằng tiền tố @_ ở phía JSON, nên chuyển đổi qua lại giữ chúng nguyên vẹn.
Các phần tử XML lặp lại trở thành một mảng JSON, và các mảng trong JSON trở thành các phần tử lặp lại trong XML.
Không. Việc chuyển đổi chạy hoàn toàn trong trình duyệt của bạn, nên dữ liệu của bạn không bao giờ rời khỏi thiết bị.
Nhúng công cụ này
Thêm công cụ này vào trang web của riêng bạn. Sao chép đoạn mã bên dưới; nó tự động cập nhật.
<iframe src="https://monu.tools/embed/vi/json-xml-converter" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>Công cụ liên quan
Định dạng, làm đẹp và kiểm tra JSON trực tuyến với thông báo lỗi rõ ràng cho dữ liệu nhập không hợp lệ.
Thu gọn và kiểm tra hợp lệ JSON trong trình duyệt của bạn, và xem bạn tiết kiệm được bao nhiêu byte.
Chuyển JSON sang CSV và CSV trở lại JSON, theo cả hai chiều. Chọn dấu phân tách, xử lý các trường có dấu ngoặc kép, và sao chép kết quả. Mọi thứ chạy trong trình duyệt của bạn.
Chuyển YAML sang JSON và JSON trở lại YAML, theo cả hai chiều. Kiểm tra hợp lệ khi chuyển và hiển thị lỗi rõ ràng. Mọi thứ chạy trong trình duyệt của bạn.