JSON is used when Python data needs to travel between applications: browser requests, REST APIs, configuration files and databases all rely on it. A Python dictionary looks close to JSON, but it is not always valid JSON. This tool converts common Python literals into a clean JSON document.
True, False and None become true, false and null.A Python value such as {'project': 'json2py', 'published': True, 'version': None} becomes {"project":"json2py","published":true,"version":null}. The formatted output is easier to inspect or copy into an API client.
For production applications, use Python's built-in json.dumps(). This page is intended for quick inspection, debugging and converting small snippets. Do not paste credentials, private keys or confidential customer data into any online tool.
Read the complete Python dict to JSON guide, or go back to JSON to Python.