JSON Tool
Fix messy JSON · escape text for JSON strings
What the cleaner fixes
- Unquoted keys
{name: "x"}, even with dashes or digits{inner-self: 1, 2: "b"} - Single quotes and curly quotes from copy-paste
{'a': “b”}— curly quotes inside text stay as they are - Trailing commas, missing commas between lines, and a trailing
; - Comments:
//,/* */and# - Raw line breaks and tabs inside strings, and escapes like
\x41or\' - Python
True/False/None, hex numbers,+1,.5,007 NaN,Infinityandundefinedbecomenull(with a warning)
- Numbers keep every digit — IDs like
12345678901234567890aren't rounded, and1.0stays1.0 - Key order is kept exactly, and duplicate keys are reported