CSV is the simplest — just a spreadsheet saved as plain text. JSON is what web apps use to pass data around. XML is the older, more verbose cousin that enterprise software still relies on. Which one you need depends entirely on where the data is going and what system will read it.
Quick answer: CSV for spreadsheet data, JSON for web APIs and app configs, XML for older enterprise systems. All three are just structured text — you can open any of them in a text editor.
What is CSV and when do you use it?
CSV stands for Comma-Separated Values. It's the simplest data format:
Name,Email,Age
Alice,[email protected],28
Bob,[email protected],35
Charlie,[email protected],22
Each line is a record. Values are separated by commas. The first line is usually headers.
When you encounter CSV:
- Exporting contacts from your phone or email app
- Downloading data from a bank, payment processor, or e-commerce platform
- Exporting reports from business software
- Sharing data between systems that need a simple format
Opening CSV files: Double-click in Windows and it usually opens in Excel or Google Sheets. Each comma becomes a column divider. The data looks like a neat table.
Creating CSV files: In Excel or Google Sheets: File → Download/Export → CSV.
CSV is simple but limited. It can't represent nested data (data within data), doesn't support multiple tables in one file, and has no standard for special characters. For simple, flat data, it's perfect.
What is JSON and why is it everywhere?
JSON stands for JavaScript Object Notation. Despite the name, it's used everywhere, not just in JavaScript.
{
"name": "Alice",
"email": "[email protected]",
"age": 28,
"orders": [
{"id": "001", "total": 49.99},
{"id": "002", "total": 129.50}
]
}
JSON organizes data in key-value pairs (like a dictionary) and supports nested structures (data within data, like orders within a customer).
When you encounter JSON:
- APIs — virtually every modern API sends and receives JSON
- Configuration files for software and apps
- App settings (many apps store settings as JSON)
- Browser developer tools showing web traffic
- Data exports from modern web applications
Opening JSON files: A plain text editor works. Notepad, VS Code, any text editor. For better readability, use a JSON formatter/viewer — it adds indentation and color-coding to make the structure clear.
Alternatively, use a JSON formatter tool in your browser: paste the JSON, get a nicely formatted, readable version.
Why is JSON formatted weirdly sometimes?
JSON is often "minified" — all whitespace removed to save bytes. {"name":"Alice","age":28} is valid JSON that's harder to read. A JSON formatter adds back the whitespace and indentation to make it readable.
What is XML and where does it still appear?
XML stands for Extensible Markup Language. You'll recognize it — it looks similar to HTML:
<customers>
<customer>
<name>Alice</name>
<email>[email protected]</email>
<age>28</age>
<orders>
<order id="001">
<total>49.99</total>
</order>
</orders>
</customer>
</customers>
XML uses opening and closing tags (like <name>Alice</name>) to structure data. It's verbose but very explicit and supports complex nested structures.
When you encounter XML:
- Word documents — .docx files are actually ZIP archives of XML files inside
- RSS feeds from blogs and podcasts
- SOAP APIs (older web services)
- Software configuration files (many enterprise apps use XML configs)
- SVG image files (SVG is XML-based)
- Android app resources and configuration
Opening XML files: Text editor works. Browsers also display XML in a readable format — drag an XML file into Chrome and it shows a formatted tree view.
Which format should I choose?
| Characteristic | CSV | JSON | XML |
|---|---|---|---|
| Structure | Flat tables | Nested objects | Nested elements |
| File size | Small | Medium | Large (verbose) |
| Human readability | High | Good | Good (if formatted) |
| Common use | Spreadsheet data | Web APIs | Config, documents |
| Nested data | No | Yes | Yes |
Choose CSV when: You have simple tabular data (like a list of people, a product catalog) and you need to open it in a spreadsheet.
Choose JSON when: You're working with web APIs, app data, or anything with nested or complex structure.
Choose XML when: You're working with legacy systems, enterprise software, or document formats that require XML.
Can I convert between CSV, JSON, and XML?
Sometimes you receive data in one format and need it in another:
JSON to CSV: Works well for flat JSON structures. Nested JSON is tricky to flatten into a table. A browser-based converter handles most cases.
CSV to JSON: Straightforward. Each row becomes an object with keys from the header row.
XML to JSON: Usually possible but depends on the XML structure. Complex XML with attributes and mixed content doesn't always convert cleanly.
What do these formats look like in practice?
A colleague once came to me frustrated because she'd downloaded a bank statement export and it opened as a wall of text. It was a CSV file that Windows had associated with Notepad instead of Excel. She thought the file was broken. Once she right-clicked → Open With → Excel, it looked exactly like a normal spreadsheet. The "wall of text" was just the raw format — perfectly valid data, just not in a UI she recognized.
You downloaded your contacts as CSV and want to import them somewhere Open in Excel, check the columns, then upload the CSV directly to the new system.
You got a JSON response from an API and want to see what's in it Paste it into a JSON formatter tool. The formatted output shows you the structure clearly.
Your app exports settings as JSON and you want to edit them Open in any text editor. Be careful with quotes and commas — JSON syntax is strict. A JSON formatter will validate it and show you any errors.
You received an XML file from a business partner Open in a text editor or browser to understand the structure. If you need it in a spreadsheet, convert to CSV (for flat data) or import into software that handles XML.
These formats are just different ways of organizing text data. Once you understand the structure, working with them is straightforward.
Frequently asked questions
Can I open a JSON file in Excel? Not directly by default — Excel doesn't natively open JSON. Your best options are: convert JSON to CSV first using a browser-based converter, then open in Excel; or use Excel's built-in Power Query (Get Data → From File → JSON) which can import JSON data.
Is this completely free? Yes — no account, no payment, no watermark needed. You can use it as many times as you want.
Do my files get uploaded to a server? No. Everything runs directly in your browser using WebAssembly. Your files never leave your device.