Stax
Tools

JSON เป็น CSV

แปลง array ของ JSON object เป็น CSV สำหรับสเปรดชีต

Must be an array of objects

3 rows · 4 columns
name,age,city,role
Alice,28,Mumbai,Engineer
Bob,34,Delhi,Designer
Carol,25,Bengaluru,PM
Nested objects and arrays are JSON-stringified in their cell. Values containing commas, quotes, or line breaks are automatically quoted per RFC 4180.

ทำไมต้องแปลง JSON เป็น CSV?

เมื่อใดควรใช้เครื่องมือนี้

รูปแบบ CSV (RFC 4180)

JSON เป็นรูปแบบมาตรฐานสำหรับ API แต่ CSV คือสิ่งที่เครื่องมือสเปรดชีต (Excel, Google Sheets) เข้าใจโดยธรรมชาติ การแปลงข้อมูลการตอบสนอง API เป็น CSV ช่วยให้คุณวิเคราะห์ในเครื่องมือที่คุ้นเคย แบ่งปันกับผู้มีส่วนได้ส่วนเสียที่ไม่ใช่เทคนิค หรือนำเข้าไปยังฐานข้อมูล

converter นี้ปฏิบัติตาม RFC 4180 มาตรฐาน de facto สำหรับไฟล์ CSV ฟิลด์ที่มี commas, double quotes หรือ newlines ถูกล้อมด้วย double quotes ทำให้ผลลัพธ์เข้ากันได้กับ Excel, Google Sheets และเครื่องมือข้อมูลแทบทุกชนิด

หาก JSON ของคุณมี nested objects ลึก ฟิลด์ที่ซ้อนกันจะถูก stringify ลงใน cell เดียว สำหรับผลลัพธ์ที่สะอาดกว่า ให้ flatten JSON ก่อน: ใช้ spread operator ของ JavaScript หรือไลบรารีเช่น flat เพื่อนำ nested keys ขึ้นสู่ระดับบนก่อนแปลง

นักพัฒนา backend export ข้อมูลการตอบสนอง API เพื่อแบ่งปันกับนักวิเคราะห์ นักวิทยาศาสตร์ข้อมูลแปลง JSON database dumps สำหรับการนำเข้า pandas หรือ R Product manager ดาวน์โหลด JSON reports และแปลงเป็นสเปรดชีต

converter นี้ทำงานในเบราว์เซอร์ทั้งหมด ข้อมูล JSON ที่มีข้อมูลส่วนบุคคล บันทึกทางการเงิน หรือ API keys ไม่เคยถูกส่งไปยัง server ใดๆ คุณสามารถตรวจสอบได้โดยเปิด browser DevTools → แท็บ Network

  • Export ข้อมูล API เพื่อแบ่งปันกับทีมธุรกิจในสเปรดชีต
  • แปลงผลลัพธ์ query ฐานข้อมูลสำหรับการรายงาน
  • เตรียมข้อมูลสำหรับนำเข้าจำนวนมากใน CRM, เครื่องมืออีเมล หรือแพลตฟอร์ม analytics
  • การวิเคราะห์ข้อมูลอย่างรวดเร็วโดยไม่ต้องเขียน script

คำถามที่พบบ่อย

What JSON format does this converter accept?
The converter accepts a JSON array of objects — for example: [{"name": "Alice", "age": 28}, {"name": "Bob", "age": 34}]. Each object becomes a row in the CSV; the keys become column headers.
What happens to nested objects or arrays?
Nested objects and arrays are JSON-stringified into a single cell value. For example, {"address": {"city": "Mumbai"}} becomes a cell containing {"city":"Mumbai"}. For deeply nested data, consider flattening it before converting.
How are special characters handled?
Values containing commas, double quotes, or newlines are automatically wrapped in double quotes per RFC 4180 — the standard CSV format. Double quotes within values are escaped by doubling them (e.g. " becomes "").
What if objects have different keys?
The converter collects all unique keys from all objects and uses them as headers. Objects missing a key will have an empty cell for that column. This handles inconsistent JSON structures gracefully.
Is my data sent to a server?
No. All conversion happens entirely in your browser using JavaScript. No data is uploaded or stored anywhere.

เครื่องมือที่เกี่ยวข้อง