แปลง JSON เป็น XML และ XML กลับเป็น JSON ในทั้งสองทิศทาง ทั้งหมดในเบราว์เซอร์ของคุณ
วิธีใช้ JSON / XML
เลือกทิศทาง: JSON เป็น XML หรือ XML เป็น JSON
วาง JSON หรือ XML ของคุณ
คัดลอกผลลัพธ์ที่แปลง หรือ swap เพื่อแปลงกลับ
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.
คำถามที่พบบ่อย
Attributes ถูกเก็บโดยใช้ prefix @_ บน JSON side ดังนั้นการแปลงไปและกลับเก็บไว้
XML elements ที่ซ้ำกันกลายเป็น JSON array และ arrays ใน JSON กลายเป็น elements ที่ซ้ำกันใน XML
ไม่ การแปลงทำงานทั้งหมดในเบราว์เซอร์ของคุณ ดังนั้นข้อมูลของคุณไม่ออกจากอุปกรณ์
ฝังเครื่องมือนี้
เพิ่มเครื่องมือนี้ลงในเว็บไซต์ของคุณเอง คัดลอกสคริปต์ด้านล่าง โดยจะอัปเดตให้เป็นปัจจุบันโดยอัตโนมัติ
<iframe src="https://monu.tools/embed/th/json-xml-converter" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>เครื่องมือที่เกี่ยวข้อง
จัดรูปแบบ ทำให้สวยงาม และตรวจสอบ JSON ออนไลน์ พร้อมข้อความแสดงข้อผิดพลาดชัดเจนสำหรับข้อมูลที่ไม่ถูกต้อง
ย่อและตรวจสอบ JSON ในเบราว์เซอร์ของคุณ และดูว่าประหยัดได้กี่ไบต์
แปลง JSON เป็น CSV และ CSV กลับเป็น JSON ได้ทั้งสองทิศทาง เลือกตัวคั่น จัดการฟิลด์ที่มีเครื่องหมายอ้างอิง และคัดลอกผลลัพธ์ ทุกอย่างทำงานในเบราว์เซอร์ของคุณ
แปลง YAML เป็น JSON และ JSON กลับเป็น YAML ได้ทั้งสองทิศทาง ตรวจสอบความถูกต้องขณะแปลงและแสดงข้อผิดพลาดที่ชัดเจน ทุกอย่างทำงานในเบราว์เซอร์ของคุณ