ToolHop.

ADVERT

๐Ÿงช JSON.stringify Playground

Interactively explore JSON.stringify options. Try replacer arrays or functions, adjust indentation, and inspect replacer call traces.

JSON.stringify Playground

Experiment with JSON.stringify without leaving the browser. Toggle replacers, indentation, key ordering, and inspect the replacer call trace to understand exactly how serialization works.

Input JSON

Edit the source payload you want to stringify.

Stringify Output

Custom replacer function

JSON.stringify(value, replacer, 2);
222 characters14 lines

Replacer Trace

KeyIncoming valueReturned value
(root){"email":"ada@example.com","id":42,"metrics":{"conversion":0.4821,"createdAt":"1843-12-10T00:00:00.000Z","visits":1234},"name":"Ada Lovelace","password":"supers3cret","roles":["admin","editor"]}{"email":"ada@example.com","id":42,"metrics":{"conversion":0.4821,"createdAt":"1843-12-10T00:00:00.000Z","visits":1234},"name":"Ada Lovelace","password":"supers3cret","roles":["admin","editor"]}
emailada@example.comada@example.com
id4242
metrics{"conversion":0.4821,"createdAt":"1843-12-10T00:00:00.000Z","visits":1234}{"conversion":0.4821,"createdAt":"1843-12-10T00:00:00.000Z","visits":1234}
conversion0.48210.48
createdAt1843-12-10T00:00:00.000Z1843-12-10T00:00:00.000Z
visits12341234
nameAda LovelaceAda Lovelace
passwordsupers3cretundefined
roles["admin","editor"]["admin","editor"]
0adminadmin
1editoreditor

ADVERT

ADVERT

JSON.stringify Playground - Experiment with JSON Serialization