แปลง JSON เป็น CSV และ CSV กลับเป็น JSON ได้ทั้งสองทิศทาง เลือกตัวคั่น จัดการฟิลด์ที่มีเครื่องหมายอ้างอิง และคัดลอกผลลัพธ์ ทุกอย่างทำงานในเบราว์เซอร์ของคุณ
วิธีใช้ JSON ⇄ CSV
เลือกทิศทาง: JSON เป็น CSV หรือ CSV เป็น JSON
วางข้อมูลและเลือกตัวคั่น (จุลภาค เซมิโคลอน หรือแท็บ)
คัดลอกผลลัพธ์จากแผงเอาต์พุต
This converter turns a JSON array of objects into CSV and parses CSV back into JSON, in both directions. Pick the direction, paste your data, choose the delimiter, and copy the result.
It is handy for moving data between spreadsheets, APIs and config files, and the whole conversion is client-side, so your data stays private.
It expects JSON as an array of objects, like [{"name":"Mo","age":3}]. The CSV columns are the union of all the keys across the objects, a single object becomes one row, and any nested value is written as JSON text inside its cell.
It follows the standard CSV quoting rules, so a value that contains the delimiter, a quote or a line break is wrapped in quotes and escaped correctly, and the CSV parser reads those values back without losing data.
You can choose comma, semicolon or tab as the delimiter. Comma is the default and most common; semicolon suits regions where the comma is the decimal separator and spreadsheets expect it; tab produces TSV.
When reading CSV back into JSON, it infers types sensibly: plain numbers and true/false become real JSON values, while a value with a leading zero such as 007 stays as text so identifiers and codes are not mangled.
คำถามที่พบบ่อย
อาร์เรย์ของออบเจกต์ เช่น [{"name":"Mo","age":3}] คอลัมน์คือการรวมของคีย์ทั้งหมด ออบเจกต์เดี่ยวกลายเป็นหนึ่งแถว และค่าที่ซ้อนกันจะถูกเขียนเป็น JSON ภายในเซลล์
ได้ ฟิลด์ที่มีตัวคั่น เครื่องหมายคำพูด หรือการขึ้นบรรทัดใหม่จะถูกอ้างอิงและ escape ตามมาตรฐาน CSV และตัวแยกวิเคราะห์ CSV จะอ่านกลับคืนได้อย่างถูกต้อง
เมื่ออ่าน CSV ตัวเลขธรรมดาและ true/false จะกลายเป็นค่า JSON จริง ส่วนค่าที่ขึ้นต้นด้วยศูนย์ (เช่น 007) จะยังคงเป็นข้อความเพื่อไม่ให้ตัวระบุถูกเปลี่ยน
ไม่ การแปลงทำงานทั้งหมดในเบราว์เซอร์ของคุณ ไม่มีสิ่งที่คุณวางออกจากอุปกรณ์
ฝังเครื่องมือนี้
เพิ่มเครื่องมือนี้ลงในเว็บไซต์ของคุณเอง คัดลอกสคริปต์ด้านล่าง โดยจะอัปเดตให้เป็นปัจจุบันโดยอัตโนมัติ
<iframe src="https://monu.tools/embed/th/json-csv-converter" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>เครื่องมือที่เกี่ยวข้อง
จัดรูปแบบ ทำให้สวยงาม และตรวจสอบ JSON ออนไลน์ พร้อมข้อความแสดงข้อผิดพลาดชัดเจนสำหรับข้อมูลที่ไม่ถูกต้อง
ย่อและตรวจสอบ JSON ในเบราว์เซอร์ของคุณ และดูว่าประหยัดได้กี่ไบต์
แปลง YAML เป็น JSON และ JSON กลับเป็น YAML ได้ทั้งสองทิศทาง ตรวจสอบความถูกต้องขณะแปลงและแสดงข้อผิดพลาดที่ชัดเจน ทุกอย่างทำงานในเบราว์เซอร์ของคุณ
สร้าง TypeScript interfaces จากตัวอย่าง JSON พร้อม nested types, arrays และ optional fields ทำงานในเบราว์เซอร์ของคุณ