PDFのミカタ

1行目を見出しにするかどうか

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

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

CSVをJSONに変換するときの大きな分かれ道が、「1行目を見出しとして使う」にチェックを入れるかどうかです。CSVとJSONを相互変換する の画面で、その違いを説明します。

手順

  1. 「変換の向き」で、「CSV → JSON」を選びます。
  2. 「変換前」に、CSVを貼り付けます。
  3. 「1行目を見出しとして使う(CSV → JSON)」の、チェックを決めます。
  4. 「変換する」を押して、「変換後」を確認します。
チェックありだと、1行目が項目名になります。チェックなしだと、行の配列になります。

チェックありの場合

1行目が項目名になり、2行目以降が、その項目の値になります。

CSV:

名前,年齢

山田,30

結果:「名前: 山田」「年齢: 30」のように、項目名のついたデータになります。

プログラムで使うときは、項目名で取り出せるので、扱いやすい形です。

チェックなしの場合

すべての行が、同じ扱いになり、行ごとの値の並び(配列)になります。

結果:「山田, 30」のように、項目名のない値の並びになります。

どちらを選ぶか

見出しがない表にチェックを入れた場合

1行目のデータが、項目名になってしまい、最初の行のデータが失われます。結果を見て、おかしければ、チェックを外します。

見出しが同じ名前の場合

同じ項目名が複数あると、後ろの値が、前の値を上書きしてしまう場合があります。見出しは、重複しないように直します。

向いている場面

例

商品名・価格・在庫の表を、WebアプリのデータにするためにJSONへ変換した。1行目が見出しなので、チェックを入れた。

つまずきやすい点

よくある質問

後から、チェックを変えられますか?

できます。チェックを変えて、もう一度「変換する」を押します。

まとめ

1行目が項目名ならチェックあり。結果を見て、おかしければ切り替えましょう。

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

あわせて使えるツール

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

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

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

解説の一覧を見る

Using the First Row as Headers

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

Key points
  • Check
  • Choose

The big fork in converting CSV to JSON is whether to tick "Use the first row as headings". Here is the difference, following the screen of Convert CSV and JSON.

Steps

  1. For "Direction", choose "CSV → JSON".
  2. Paste the CSV into "Before conversion".
  3. Decide the tick for "Use the first row as headings (CSV → JSON)".
  4. Press "Convert" and check "After conversion".
With the tick, the first row becomes the item names. Without it, you get an array of rows.

With the tick

The first row becomes item names, and the second row onwards become the values of those items.

CSV:

name,age

Yamada,30

Result: data with item names, like "name: Yamada" and "age: 30".

When used in a program, values can be retrieved by item name, an easy-to-handle form.

Without the tick

All rows are treated alike and become a sequence (array) of values per row.

Result: a sequence of values without item names, like "Yamada, 30".

Which to choose

If you tick for a table without headings

The first row of data becomes the item names and the first row's data is lost. If the result looks wrong, untick.

When headings have the same name

If the same item name appears more than once, later values may overwrite earlier ones. Fix headings so they don't repeat.

Good for

Example

Converted a table of product name, price and stock to JSON to use as web app data. The first row was headings, so ticked.

Common stumbling blocks

Frequently asked questions

Can I change the tick afterwards?

Yes. Change the tick and press "Convert" again.

Summary

If the first row is item names, tick. Look at the result and switch if it looks wrong.

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