Format and Copy JSON Directly in the Browser Console
2024-06-21
When the object is already in memory, a one-liner in Console beats exporting HAR files—if you know how to copy valid JSON text.
copy and stringify
Chrome copy(obj); universal: copy(JSON.stringify(obj, null, 2)).
copy(JSON.stringify(responseData, null, 2));console.table
Good for object arrays; deep nesting still needs stringify or formatted output from an online tool.
Network panel
Copy response; huge bodies may truncate—use curl/file for giants.
Circular refs
DOM-linked objects fail stringify—copy plain subsets only.
With online tools
Console → paste local formatter → validate, minify, save fixtures securely.