Paste your Python dictionary literal (using curly braces or dict() syntax) and instantly get clean, formatted JSON output. Supports single/double-quoted strings, None/True/False, nested dicts, lists, tuples, inline comments, and numeric formats like hex and underscore separators.
Paste your Python dictionary literal (using curly braces or dict() syntax) and instantly get clean, formatted JSON output. Supports single/double-quoted strings, None/True/False, nested dicts, lists, tuples, inline comments, and numeric formats like hex and underscore separators.
Common questions and answers about this topic.
Python dictionaries use single or double quotes for strings, True/False for booleans, and None for null values. JSON requires double quotes, uses true/false, and null. This tool automatically handles these conversions.
This converter supports curly brace dict literals ({'key': 'value'}), dict() constructor syntax, single and double-quoted strings, nested dicts and lists, tuples (converted to arrays), None/True/False, numbers with underscore separators (1_000_000), hex/octal/binary literals, scientific notation, and inline comments (#).
Yes, you can adjust the tab width (2 or 4 spaces) or switch to tab-based indentation using the formatting options above the output panel.
Python's None is converted to JSON's null, True becomes true, and False becomes false. These are automatically mapped to their JSON equivalents during conversion.