Toolivaro

無料のJSON to CSV 変換

JSON のオブジェクト配列を RFC 4180 準拠の CSV に変換します。正しい引用符処理、列の結合(ユニオン)、コピー・ダウンロードに対応しています。

JSON to CSV コンバーターは、JSON のオブジェクト配列をスプレッドシートですぐ開ける CSV ファイルに変換します。API レスポンス、データベースの書き出し、テストデータなど、オブジェクトの配列を貼り付けると、すべてのオブジェクトのキーの和集合から列の集合を導出し、RFC 4180 の引用符処理(カンマ・引用符・改行を含むセルは引用符で囲み、セル内の引用符は二重化)で各行をシリアライズし、CRLF 終端のファイルを出力します。欠けているキーは空セルになり、ネストした値は JSON 文字列としてシリアライズされ、null と undefined は空セルになります。このツールは変換前に入力を検証し、空でないオブジェクト配列でない場合は何が問題かを正確に説明します。すべてブラウザ内のローカルで処理されるため、貼り付けた JSON がデバイスの外に出ることはなく、ログにも記録されず、送信もされません。コピーとダウンロードの操作で、ファイルを必要な場所に届けられます。API のデータをスプレッドシートで開きたいとき、技術者でない関係者にレポートを渡すとき、JSON を受け付けないツール向けに CSV インポートを用意するときにご利用ください。

ブラウザ内でローカル処理されます

すべてブラウザ内で処理され、データが外部に送信・記録・保存されることはありません。

この計算機の使い方

How the column set is built

JSON-to-CSV flattens an array of objects into a spreadsheet-ready table, and the first job is deciding the columns. The converter takes the union of every object’s keys in first-seen order: the first object contributes its keys in order, then new keys from later objects are appended. That is the behavior that keeps the output correct when rows disagree — an API response where one user has a city and another does not produces a name, age, city table with an empty cell where city is missing, and every row lines up with the header.

The input contract is strict because the output needs a stable shape: the converter requires a non-empty array of objects. A bare object, an array of strings, or an empty array is rejected with a message that says what was wrong, rather than guessed into a structure that would break downstream.

What happens to values that are not simple text

CSV cells are text, so values are serialized the way the format allows: missing keys become empty cells, null and undefined become empty cells, and nested values — an object or array inside a cell — are serialized as JSON strings, so {"x":1} stays the text {"x":1}. That is the only lossless flat representation: the nested data survives verbatim in the cell, and any spreadsheet software shows it as text.

Numbers and booleans are written as their plain forms (30, true), which is the natural convention for spreadsheet imports. True flattening of deep structures — turning every nested key into its own column — is outside the converter’s scope, and the page says so rather than pretending otherwise.

Quoting and line endings: the RFC 4180 contract

The output follows RFC 4180 exactly so every spreadsheet application opens it correctly: cells containing a comma, a quote, or a line break are wrapped in double quotes, embedded quotes are doubled (""), and rows are terminated with CRLF — the line ending the standard defines and the one spreadsheet tools expect. The worked example shows the pair in action: the cell "New York, NY" is quoted because of its comma, and the file ends every row with CRLF.

Getting these details right is the difference between a file that opens cleanly and one that splits columns or misaligns rows. The converter never produces the unquoted forms that break on the first address containing a comma.

The local promise

API responses, database exports, and test data often contain internal details that should not leave your machine, and converting JSON to CSV is a job no server needs to perform. Everything runs in your browser: the JSON is parsed and serialized locally, nothing is uploaded, logged, or stored, and copy and download actions deliver the CSV file where you need it — a spreadsheet, an import tool, or a stakeholder who asked for the data in a readable form.

結果はどうやって計算されるの?

API レスポンスをスプレッドシートに書き出す

API が異なるフィールドを持つユーザーを返します。あるユーザーには city があり、別のユーザーにはありません。コンバーターはすべてのキー(name、age、city)から列の集合を構築し、city が欠けている場所には空セルを出力し、カンマを含むセルは引用符で囲みます。結果はスプレッドシートソフトでそのまま開けます。

入力と出力の例
入力
json [{"name":"Alice","age":"30","city":"Paris"},{"name":"Bob","age":"25"}]
結果 name,age,city Alice,30,Paris Bob,25,

計算式と前提は?

列の集合

columns = union of all object keys, first-seen order

計算式の記号
記号 意味
union いずれかのオブジェクトに現れるすべてのキー

キーを持たないオブジェクトはその列で空セルになります。列の順序はファイル全体で安定しています。

セルの引用符処理(RFC 4180)

quoted ⇔ cell contains comma, quote, or line break

計算式の記号
記号 意味
quote 引用符で囲まれたセル内のダブルクォートは二重にします("")
line break 行間には CRLF を使用します

よくある間違いは?

  • 配列ではなく単一のオブジェクトを変換すること。コンバーターは空でないオブジェクト配列を必要とし、その理由を説明します。
  • ネストしたオブジェクトがフラット化されると思い込むこと。これらは JSON 文字列としてシリアライズされます。それが唯一のロスレスなフラット表現です。
  • JSON をアップロードするオンラインの変換ツールを使うこと。このツールはすべてお使いのデバイス上で処理します。

前提と制限は?

  • 入力は空でないオブジェクト配列である必要があります。単体のオブジェクトやプリミティブの配列は、明確なメッセージとともに拒否されます。
  • ネストした値は JSON 文字列のままです。深い構造の本格的なフラット化はコンバーターの対象外です。
  • 非常に大きな配列はメモリ上で処理されます。このツールは一般的なペイロード向けで、データベースのダンプには対応していません。

数値の出典は?

最終確認 2026年8月4日 · バージョン 1.0.0 · Toolivaro 外部コンテンツを保証するものではありません。

よくある質問

ネストしたオブジェクトはどう変換されますか?

ネストした値はセル内で JSON 文字列としてシリアライズされます。たとえば {"x":1} は {"x":1} というテキストになります。CSV はフラットな形式なので、より深い構造はフラット化するか、別の書き出しが必要です。

列の順序はどうなりますか?

配列を先頭から順に見て、最初に登場した順になります。最初のオブジェクトが自分のキーを順に寄与し、後続のオブジェクトの新しいキーは末尾に追加されます。どのオブジェクトがどのキーを持つかにかかわらず、すべての行がヘッダーに揃います。

ファイルの末尾が CRLF なのはなぜですか?

CRLF は RFC 4180 の行区切りであり、スプレッドシートアプリケーションが期待する慣習です。ファイルがどこでも正しく開けるよう、コンバーターはデフォルトで CRLF を出力します。

Can I convert an object instead of an array?

No — the converter requires a non-empty array of objects, because that is the shape that maps to rows. A bare object is rejected with a clear message; wrap it in an array if that is what you have.

Why do my null values come out as empty cells?

Null and undefined mean "no value here" in JSON, and an empty cell is the honest CSV equivalent — the column position is preserved, and the spreadsheet shows the absence rather than a placeholder that could be mistaken for data.

このコレクションの一部 開発者向けテキスト・JSONツールキット

間違いを見つけましたか? 報告する — すべての修正を確認します.

このツールは役に立ちましたか?

Toolivaro編集チームが当社の方法論に基づいてレビュー済み 計算方法 · 編集方針