Tricky JSON values: nulls, empty objects, unicode strings, deep nesting, XSS strings, large numbers. Free to use, no attribution required — copy it, download it, or open it directly in the JSON Formatter. Runs entirely in your browser.
{
"nullValues": {
"nullField": null,
"undefinedAsNull": null,
"emptyString": "",
"zeroNumber": 0,
"falseBoolean": false,
"emptyArray": [],
"emptyObject": {}
},
"numbers": {
"integer": 42,
"float": 3.14159265358979,
"negative": -273.15,
"zero": 0,
"largeNumber": 9007199254740991,
"smallFloat": 1e-9,
"scientificNotation": 12300000000,
"negativeScientific": -4.56e-7
},
"strings": {
"empty": "",
"singleChar": "a",
"withSpaces": " leading and trailing spaces ",
"withNewlines": "line1\nline2\nline3",
"withTabs": "col1\tcol2\tcol3",
"withUnicode": "Hello 世界 🌍 مرحبا",
"withEmoji": "🎉🚀💻🔥",
"withSpecialChars": "!@#$%^&*()_+-=[]{}|;':\",./<>?",
"sqlInjection": "'; DROP TABLE users; --",
"xssAttempt": "<script>alert('xss')</script>",
"jsonInString": "{\"nested\": \"json\"}",
"backslashes": "C:\\Users\\test\\file.txt",
"veryLong": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
"booleans": {
"trueValue": true,
"falseValue": false
},
"arrays": {
"empty": [],
"singleItem": [
1
],
"mixed": [
1,
"two",
true,
null,
{
"key": "value"
},
[
3,
4
]
],
"nested": [
[
1,
2
],
[
3,
4
],
[
5,
[
6,
[
7
]
]
]
],
"withNulls": [
1,
null,
2,
null,
3
]
},
"objects": {
"empty": {},
"singleKey": {
"key": "value"
},
"deeplyNested": {
"level1": {
"level2": {
"level3": {
"level4": {
"value": "deep"
}
}
}
}
},
"numericKeys": {
"0": "zero",
"1": "one",
"2": "two"
},
"duplicateKeyExample": "JSON doesn't allow duplicate keys — parsers typically keep the last value"
},
"dates": {
"isoDate": "2024-01-15",
"isoDateTime": "2024-01-15T10:30:00Z",
"isoWithMillis": "2024-01-15T10:30:00.123Z",
"unixTimestamp": 1705314600,
"invalidDate": "not-a-date"
}
}