Beautify your JSON response in Chrome dev tools in 1 sec

Adil Ben Moussa
1 min readNov 22, 2018

--

Imagine you have a very large JSON response you want to view/copy/manipulate, but the most of the time you got a long one lite string, using Chrome dev tools in combination with JSON.stringify will solve this limitation.

For this example lets use this simple JSON object:

[{"name":"Steve","surname":"Jobs","company":"Apple"},{"name":"Bill","surname":"Gates","company":"Microsoft"}]

Chrome dev tools enables us to write javascript code in the console, as you already know, so we can make use of it to stringify our object

Chrome dev tools team has added a very small feature to it that but so important, when the parsed object is to large, it adds as a show more and a copy button which makes developers life very easy.. kudos Dev tools team

Thanks for reading! Please share, drop a 👏 (or two), and happy coding.

--

--