JSON to Python Dict / List
Converts a JSON object or array into a Python dict / list literal.
null becomes None, true → True, false → False.
Nothing leaves your browser.
About This Tool
Takes a JSON value and renders it as Python source: a dict or list literal with the same structure, spelled the Python way: null → None, true/false → True/False. Paste the result directly into a script or REPL.
Produces a literal value, not a schema. If you need Python type definitions that describe the shape of the data, use JSON to Python (@dataclass / TypedDict) instead.
Key Features
- Live conversion: Output updates as you type, plus Convert button and Ctrl/Cmd+Enter.
- File upload: Load a .json or .txt file via the Upload button.
- One-click swap: The swap button sends the current output to Python Dict / List to JSON as prefilled input.
- Python-formatted output: 4-space indent and trailing commas, matching standard Python style.
- Download as .py: Save the rendered literal directly to a file.