PDFのミカタ

入れ子になったJSONを変換するときの注意

公開日:2026年10月19日|最終更新:2026年10月19日|運営者情報

この記事のポイント
  • 貼る
  • 確かめる

APIなどのJSONには、データの中に、さらにデータが入った「入れ子」の形が、よくあります。CSVとJSONを相互変換する で、入れ子のJSONをCSVに変換するときの注意をまとめます。

手順

  1. 「変換の向き」で、「JSON → CSV」を選びます。
  2. 「変換前」に、JSONを貼り付けます。
  3. 「変換する」を押します。
  4. 「変換後」を確認します。
入れ子の部分は、文字列のまま1つのセルに入ります。必要なら、先にJSONを平らな形に直します。

入れ子とは

たとえば、次のようなデータです。

「住所」の中に、さらに項目が入っています。これが、入れ子です。

変換したときの結果

CSVは、平らな表です。入れ子の部分は、表の形にできないため、中身が文字としてそのまま、1つのセルに入ります。

平らな形に直す方法

どのくらい直すか

配列(リスト)の入れ子

1つの項目に、複数の値(リスト)が入っている場合も、1つのセルに文字として入ります。リストの要素ごとに、行を分けたいときは、先に整形します。

向いている場面

例

注文データのJSONを変換した。「商品」の項目に、商品の一覧が入っていて、1つのセルに文字として入った。商品ごとに集計するため、先に商品ごとの行になるよう整形してから、変換し直した。

つまずきやすい点

よくある質問

入れ子を自動で展開できますか?

このツールは、入れ子の展開はしません。先に整形してください。

まとめ

入れ子は、1つのセルに文字として入る。集計したいなら、先に平らにしましょう。

CSVとJSONを相互変換するを使う(無料)

あわせて使えるツール

この解説が役に立ったら、応援してもらえるとうれしいです。

応援する(300円)ほしい物リストで応援

同じツールの、ほかの解説

解説の一覧を見る

Notes on Nested JSON

Published: Oct 19, 2026 | Updated: Oct 19, 2026 | About (Japanese)

Key points
  • Paste
  • Check

JSON from APIs and the like often has a "nested" form, where data contains further data. Here are cautions for converting nested JSON to CSV with Convert CSV and JSON.

Steps

  1. For "Direction", choose "JSON → CSV".
  2. Paste the JSON into "Before conversion".
  3. Press "Convert".
  4. Check "After conversion".
Nested parts go into a single cell as text. If needed, flatten the JSON first.

What nesting is

For example, data like this.

Inside "Address" are further items. That is nesting.

The result after conversion

CSV is a flat table. Nested parts cannot take a table form, so their content goes into a single cell as text.

Ways to flatten

How much to fix

Nested arrays (lists)

When one item holds several values (a list), it also goes into one cell as text. If you want rows split per list element, reshape first.

Good for

Example

Converted order data JSON. The "products" item held a list of products and went into one cell as text. To total per product, reshaped it to one row per product first and converted again.

Common stumbling blocks

Frequently asked questions

Can nesting be expanded automatically?

This tool does not expand nesting. Reshape first.

Summary

Nesting goes into one cell as text. If you want to total it, flatten first.

Use "Convert CSV and JSON" (free)

Tools that go well with this

If this guide helped, a small tip would mean a lot.

Send a tip (¥300)Send a gift (Amazon wishlist)

More guides for this tool

See all guides