CSV(Comma-Separated Values)
CSVは表形式データの最もシンプルなフォーマットで、カンマ(または他の区切り文字)で区切られた値の行です。スプレッドシート、データベース、プログラミング言語で普遍的にサポートされており、データ交換やインポート/エクスポートワークフローの共通言語となっています。
MIMEタイプ
text/csv
種類
テキスト
圧縮
無劣化
メリット
- + Universal support in Excel, Google Sheets, databases, and every language
- + Human-readable and easy to generate
- + Minimal overhead — just data, no formatting or metadata
- + Streamable — can be processed line by line for large files
デメリット
- − No data type information — numbers, dates, and strings all look the same
- − Encoding and delimiter ambiguity (comma vs semicolon vs tab)
- − No support for hierarchical or nested data
.CSVを使うタイミング
シンプルなデータのエクスポート/インポート、スプレッドシートのデータ交換、スクリプトやパイプラインへのデータ供給にCSVを使用してください。
技術的詳細
CSVファイルは各行が改行で区切られ、値がカンマで区切られたプレーンテキストです。引用フィールド(ダブルクォート)にはカンマ、改行、エスケープされたクォートを含めることができます。データ型の標準はなく、すべてが文字列です。
歴史
カンマ区切りデータフォーマットはパーソナルコンピュータ以前に遡り、1970年代初頭のIBM Fortranに登場しました。RFC 4180(2005年)がCSV仕様を正式化しましたが、多くのバリエーションが存在します。
.CSVから変換
.CSVに変換
関連フォーマット
関連用語
Learn More
File Format Conversion: A Complete Guide
Converting files between formats is a daily task for professionals across every industry. This comprehensive guide covers document, image, audio, …
How to Generate Strong Random Passwords
Password generation requires cryptographic randomness and careful character selection. This guide covers the principles behind strong password generation, entropy calculation, …
JSON vs YAML vs TOML: Choosing a Configuration Format
Configuration files are the backbone of modern applications. JSON, YAML, and TOML each offer different trade-offs between readability, complexity, and …
Text Encoding Explained: UTF-8, ASCII, and Beyond
Text encoding determines how characters are stored as bytes. Understanding UTF-8, ASCII, and other encodings prevents garbled text, mojibake, and …
CSV vs JSON vs XML: Data Exchange Formats Compared
Data exchange formats serve different needs. CSV excels at tabular data, JSON dominates web APIs, and XML powers enterprise integrations. …
How to Format and Validate JSON Data
Malformed JSON causes silent failures in APIs and configuration files. Learn how to format, validate, and debug JSON documents to …