json-tools .ru

CSV to Python dict

Reads a CSV table and outputs a list of Python dictionaries — one dict per data row.

What you get in code

The result is a list[dict] literal where each dict's keys come from the CSV headers, and the values stay as strings — CSV doesn't carry type information, so numbers and true/false in cells are just text.

Further processing

This list is easy to paste into a script that then casts the relevant columns to int/float/bool itself — the converter deliberately doesn't guess types, so it won't mangle values like a leading zero in an ID.

Format
CSV → Python
Source text Paste text or upload a file
Result Type is not detected yet
Statistics appear after formatting