{"name": "John", "age": 30, "address": {"city": "Delhi", "pin": 110001}}
. Nested dictionaries
are supported.This tool converts a Python dictionary (entered as text) into JSON format. It supports both formatted (pretty-printed) and minified JSON output, with features like copying to clipboard, clearing the input, and highlighting error lines with line and column numbers.
You can enter any valid Python dictionary, including nested dictionaries. For example:
{"key": "value", "nested": {"a": 1}}
. The tool automatically converts Python-specific syntax
(like True
, False
, None
, single quotes) to JSON-compatible syntax.
An error message appears if the input is not a valid Python dictionary. Common issues include missing quotes around strings, trailing commas, or incorrect syntax. The problematic line will be highlighted in the output textarea, with the exact line and column numbers shown to help you fix it.
If the input is invalid, the output textarea will show the input text with the problematic line highlighted in red, along with a note indicating the line and column of the error (e.g., "Error at line 68, column 11"). An error message will also appear below, explaining the issue. Fix the input and try again.
Yes, the tool can handle large and complex nested dictionaries, as long as they are valid. However, very large inputs may slow down the conversion slightly due to browser processing limits.