Toolivaro

無料のCSV to JSON 変換

CSV ファイルや貼り付けた表を JSON オブジェクトに変換します。区切り文字の自動検出とヘッダーのマッピングに対応しています。

CSV to JSON コンバーターは、スプレッドシートの書き出しや貼り付けた表を、API やスクリプト、データ処理ですぐ使える JSON オブジェクトに変換します。CSV テキストを貼り付けるかファイルを読み込むと、RFC 4180 のセマンティクスで解析します。引用符で囲まれたフィールド、値の中に埋め込まれたカンマ、エスケープされた引用符、複数行にまたがるセルもすべて処理し、1 行目をオブジェクトのキーにマッピングして、オブジェクトの JSON 配列を生成します。区切り文字は一般的な候補(カンマ、セミコロン、タブ、パイプ)から自動検出され、手動で上書きすることもできます。空のヘッダーは column_1、column_2 のように名付けられます。重複したヘッダーはデータを黙って失う代わりに、明確なエラーとして拒否されます。このツールはブラウザ内だけで動作するため、貼り付けたデータやアップロードしたデータがデバイスの外に出ることはなく、ログにも記録されず、送信もされません。顧客リストや社内のスプレッドシートを扱う際に重要です。出力は読みやすいインデント付きで表示され、コンパクトな形式のコピー・ダウンロード操作にも対応しています。スプレッドシートとアプリケーションの間でデータを移すとき、テスト用のフィクスチャを用意するとき、CSV から JSON API への移行をするときにご利用ください。

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

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

この計算機の使い方

How the header row becomes the schema

CSV-to-JSON works on one assumption: the first row names the columns. The converter maps each header to an object key, and every data row becomes one object with those keys — the shape most APIs, scripts, and data pipelines expect. The mapping is literal: header names become keys exactly as written, so a header like "user name" produces the key "user name" with the space intact, and blank headers are named column_1, column_2, and so on so no data is dropped.

The strict part is the duplicate check: two columns with the same header would silently overwrite each other in a naive conversion, so the converter rejects the file with a clear error instead of losing data. If your spreadsheet has repeated headers, fix the source — the error names the column — rather than converting around it.

Why every value stays a string

CSV has no type information: a cell is text, and nothing in the format says whether "30" is the number thirty, the string "30", or a product code. The converter never guesses — every value is emitted as a JSON string, so "30" stays "30" and an empty cell stays an empty string. Type conversion (string to number, string to boolean) belongs in the receiving application, where the decision is explicit and testable.

That discipline is the honest behavior for a data tool: guessing types at conversion time looks convenient until a leading-zero id like "007" silently becomes the number 7. The example on this page shows the difference directly — the age "30" is quoted in the output on purpose.

Handling the messy cases: quoting, delimiters, newlines

Real spreadsheet exports are not simple comma-separated text. RFC 4180 covers the cases that break naive parsers: a field containing a comma, a quote, or a line break is wrapped in double quotes, and a double quote inside a quoted field is doubled ("") so it is distinguishable from the closing quote. The converter parses all of it — embedded commas, escaped quotes, multi-line cells — which is why a "New York, NY" value stays one cell and a cell containing a newline stays one field.

Delimiters are the other point of friction: European exports commonly use semicolons, and tab or pipe delimiters appear in tools and exports. The converter auto-detects the delimiter from common candidates, with a manual override when detection picks wrong — the selector makes the choice explicit rather than silent.

The local promise

Customer lists, internal spreadsheets, and payroll exports are precisely the data that should not be uploaded to a converter on the internet. Everything runs in your browser: the CSV is parsed locally, nothing is uploaded, logged, or stored, and copy and download actions deliver the JSON where it is needed. The honest limits are on the page too: the converter reads the whole file into memory, so it is built for typical spreadsheets, not database dumps.

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

顧客データの書き出しを変換する

スプレッドシートの書き出しには name、age、city の列があります。コンバーターはヘッダー行をキーにマッピングし、データ行ごとにオブジェクトを生成します。"30" が文字列のままであることに注意してください。CSV には型情報がなく、コンバーターが推測することはありません。

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

計算式と前提は?

ヘッダーのマッピング

object = { header_1: cell_1, …, header_n: cell_n }

計算式の記号
記号 意味
header_i 1 行目の i 列目の値
cell_i データ行の i 列目の値

CSV には型情報がないため、すべての値は文字列です。数値も JSON 出力では引用符付きのままとなり、型の変換はアプリケーション側で行ってください。

フィールドの引用符処理(RFC 4180)

quoted ⇔ cell contains delimiter, quote, or newline

計算式の記号
記号 意味
quote 引用符で囲まれたフィールド内のダブルクォートは二重にします("")

よくある間違いは?

  • 出力に数値やブール値を期待すること。CSV のセルは常に文字列であり、型変換はアプリケーション側の仕事です。
  • 重複ヘッダーを含むファイルを変換すること。コンバーターは列を黙って上書きせず、エラーとして拒否します。
  • データをアップロードするオンラインの変換ツールに貼り付けること。このツールはすべてローカルで処理します。

前提と制限は?

  • CSV には型情報がないため、JSON の値はすべて文字列になります。
  • ネストしたデータ(セル内の配列やオブジェクト)は独自の規約でエンコードする必要があります。CSV はフラットな形式です。
  • 非常に大きなファイルはすべてメモリに読み込まれます。このツールは一般的なスプレッドシート向けで、データベースのダンプには対応していません。

数値の出典は?

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

よくある質問

数値は JSON の数値に変換されますか?

いいえ。CSV には型情報がないため、すべての値は文字列のままです(30 ではなく "30")。受け取る側のアプリケーションで型を変換するほうが推測するより安全なので、このコンバーターは決して推測しません。

カンマを含む引用符付きフィールドはどうなりますか?

1 つのセルとして解析されます。"New York, NY" は 1 つの値のままです。フィールド内のダブルクォートは二重化され(RFC 4180)、解析時に解除されます。

セミコロン区切りのファイルも扱えますか?

はい。区切り文字は一般的な候補から自動検出され、検出が外れた場合は区切り文字のセレクターで手動上書きできます。

What happens to empty cells?

An empty cell becomes an empty string in the JSON output — the position in the row is preserved, so the column alignment stays intact and downstream code can decide how to treat blanks.

Why is my JSON output all on one line?

The output is presented with indentation for reading; the copy and download actions offer the compact form, which is the version most APIs and scripts consume. Both are valid JSON with identical data.

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

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

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

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