Monu Tools

Chuyển đổi JSON sang CSV

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.

Cách dùng JSON ⇄ CSV

  1. 01

    Chọn chiều: JSON sang CSV hoặc CSV sang JSON.

  2. 02

    Dán dữ liệu và chọn dấu phân tách (dấu phẩy, dấu chấm phẩy hoặc tab).

  3. 03

    Sao chép kết quả đã chuyển từ khung đầu ra.

What it does

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.

The JSON shape it expects

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.

Quoting and delimiters

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.

Type inference on the way back

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.

Câu hỏi thường gặp

Nó mong đợi cấu trúc JSON nào?

Một mảng các đối tượng, như [{"name":"Mo","age":3}]. Các cột là hợp của tất cả các khóa. Một đối tượng đơn thành một hàng, và các giá trị lồng nhau được ghi dưới dạng JSON bên trong ô.

Nó có xử lý dấu phẩy và dấu ngoặc kép bên trong giá trị không?

Có. Các trường chứa dấu phân tách, dấu ngoặc kép hoặc ngắt dòng được đặt trong dấu ngoặc kép và thoát theo chuẩn CSV, và trình phân tích CSV đọc lại chúng đúng.

Số và boolean có được chuyển đổi không?

Khi đọc CSV, các số thông thường và true/false trở thành giá trị JSON thực, trong khi giá trị có số 0 ở đầu (như 007) giữ nguyên dạng văn bản để định danh không bị biến dạng.

Dữ liệu của tôi có được tải lên không?

Không. Việc chuyển đổi chạy hoàn toàn trong trình duyệt của bạn; không gì bạn dán rời khỏi thiết bị.

Nguồn

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-csv-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