JSON to Python Dict Converter
Paste JSON to get a ready-to-paste Python literal. Objects become dicts, arrays become lists, and true, false and null become True, False and None.
How to convert JSON to a Python dict
- Paste or type your JSON into the box.
- Pick single or double quotes and an indent width.
- Copy the Python literal and paste it into your code.
Examples
Object with a list and null
{"name":"Ada","items":[1,2],"note":null}{
'name': 'Ada',
'items': [
1,
2,
],
'note': None,
}Frequently asked questions
Is my JSON uploaded anywhere?
No. The conversion runs entirely in your browser, so your data never leaves your device.
How are true, false and null converted?
They become Python's True, False and None, which is what makes JSON not directly valid as a Python literal.
Single or double quotes for strings?
You can choose either. Single quotes are the common Python style, but double quotes are also valid.
Is the output safe to paste into code?
Yes. Backslashes, the active quote and newlines or tabs inside strings are escaped so the literal parses cleanly.
Can I parse this back with json.loads?
No. The output is a Python literal, not JSON. Use it directly in code, or use ast.literal_eval to read it.
Related tools
JSON to PHP Array
Convert JSON to a PHP array online. Paste JSON and get a clean array() or short [] literal with correct nesting, quoting and types. Runs in your browser.
JSON to CSV
Convert JSON to CSV online. Paste an array of objects and get clean, spreadsheet-ready CSV with the right headers. Runs in your browser.
JSON Formatter
Format, validate and minify JSON online. Pretty-print with custom indentation, sort keys and catch syntax errors. Runs in your browser.
Air Fryer Converter
Convert any conventional oven recipe to air fryer settings. Lower the temperature by 25 F and cut the cook time by about 20 percent automatically.
Baking Pan Converter
Swap one baking pan for another and scale the batter to fit. Compares pan areas for round, square and rectangular pans and gives a batter scale factor.
Binary to Decimal
Convert binary to decimal online. Paste any binary number, with or without spaces, and get the exact base-10 value instantly. Runs in your browser.