Why convert REPLIT to JSON?
Developers convert .replit to .JSON to feed the run command, ports, and package settings into scripts and tooling that expect JSON rather than TOML. Because TOML and JSON share the same data model of tables, arrays, strings, and numbers, the conversion is lossless for the settings themselves.
How to convert REPLIT to JSON
Taplo CLI
Install Taplo, then run taplo get -f .replit -o json > replit.json to emit the whole file as JSON. Taplo is the same TOML engine Replit uses for editing.
yj
With yj installed, run yj -tj < .replit > replit.json to convert TOML to JSON while preserving key order.
Python tomllib + json
On Python 3.11+ run python -c "import tomllib,json;print(json.dumps(tomllib.load(open('.replit','rb'))))" > replit.json to parse the TOML and dump JSON.
About these formats
A .replit file is the project configuration file for a Replit App. It is a plain-text TOML file that tells the Replit runtime which file to open, what command the Run button executes, which…
Open .REPLIT details →A JSON file is a plain-text data file in JavaScript Object Notation format, used by web APIs, app configurations, and data exports. Any text editor opens it - Notepad on Windows, TextEdit…
Open .JSON details →Quality & what to watch
- TOML comments and formatting are dropped, since JSON has no comment support.
- TOML's native dates become plain strings in JSON.
- The JSON is only a data copy - Replit still reads the original
.replitTOML to run your app.
Frequently asked questions
Is the .replit file really TOML?
Will converting to JSON lose any settings?
Do I need to install anything?
Can Replit run from the JSON version?
.replit TOML file; the JSON is only for your own tooling.