JSON to Python Dict Converter
Convert any JSON to a valid Python dictionary. null → None, true → True, false → False. Output is paste-ready Python code.
Input JSON
0 chars
Python Output
0 chars
Python code will appear here…
JSON → Python Conversion Reference
null→None
true→True
false→False
{…}→dict {…}
[…]→list […]
"string"→"string"
123 / 1.5→int / float
Why JSON isn't valid Python
JSON and Python look similar but have key differences: JSON uses lowercase null, true, and false, while Python uses None, True, and False. Pasting raw JSON into Python raises a NameError on those values. This converter handles all three substitutions automatically, so the output is always valid Python.
You can also use Python's built-in json.loads() to parse JSON strings at runtime — but when you need a hardcoded dict in your source code, this converter gives you the exact syntax you need.