JSON Forge
100% Client-Side: your data is never sent to a server

JSON examples

Application Config JSON Example

Many applications read their settings from a JSON file. This example groups settings by area and shows common patterns such as feature flags and a list of allowed origins.

Loading editor…
Paste or type JSON on the left to explore it as a tree.
Empty🔒 Processed locally in your browser

The example

The JSON above is the example. Explore it in the Tree tab, press Download to save it as a .json file, or Share to send someone a link to it. All names, ids, emails and values are invented.

Fields explained

PathTypeNotes
serverobjectWhere and how the service listens.
databaseobjectConnection settings. Passwords are deliberately not stored here.
logging.levelstringOne of a fixed set such as debug, info, warn or error.
featuresobject of booleansFeature flags that switch behaviour without a deploy.
cors.allowedOriginsarray of stringsAn allow-list of browser origins.

Read it in code

JavaScript:

const config = JSON.parse(fs.readFileSync("config.json", "utf8"));
server.listen(config.server.port, config.server.host);

Python:

config = json.load(open("config.json"))
port = config["server"]["port"]

What this example is good for

Tips

Convert this example

Open it in a converter, then switch the output in the Code tab:

More examples

All JSON examples · Cheat sheets