json-tools .ru

JSON to Python dict

Turns JSON into a Python literal: true/false/null become True/False/None, and strings are single-quoted.

What changes in the output

The result is a valid Python literal: keys and strings are single-quoted via repr(), indentation works the same way as for JSON, and every dict/list item gets a trailing comma — which makes it easier to add another field by hand.

Where this is handy

The result can be dropped straight into Python code as test data, a mock response, or a fixture — no need to hand-edit true into True or switch quote styles.

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