Pretty-printed (formatted) sample JSON file

Last updated 2026-05-20

Example JSON

Inline preview of the formatted file; download for the same payload.

{}

Request examples

const fs = require('fs');
const formatted = JSON.stringify(JSON.parse(fs.readFileSync('./sample-minified.json', 'utf8')), null, 2);
fs.writeFileSync('./sample-formatted.json', formatted);
Back to examples

Related examples