config-convert · Converter
Convert YAML to JSON, JSON to TOML and back
Paste or drop a YAML, JSON or TOML file and pick the format you need. Syntax errors are shown before converting. Comments are not carried over.
- YAML, JSON, TOML, INI, .env
- Syntax validation and comment preservation
version: "3.9"
services:
web:
image: nginx:alpine
ports:
- "8080:80"
environment:
NODE_ENV: production
LOG_LEVEL: warn// JSON
{
"version": "3.9",
"services": {
"web": {
"image": "nginx:alpine",
"ports": ["8080:80"],
"environment": {
"NODE_ENV": "production",
"LOG_LEVEL": "warn"
}
}
}
}
# TOML
version = "3.9"
[services.web]
image = "nginx:alpine"
ports = ["8080:80"]
[services.web.environment]
NODE_ENV = "production"
LOG_LEVEL = "warn"One clear job, from source to target
- 1
Paste or drop your config
Paste config content directly into the editor or drag a file. The parser detects the format automatically from the content structure and shows any syntax errors immediately.
- 2
Choose the target format
Select where the config needs to go. The converter maps keys and structures between formats, handles nesting differences, and preserves comments when the target format supports them.
- 3
Review and copy
Check the output side by side with the source. Copy the result to your clipboard or download the converted file. A conversion report lists any fields that changed shape or comments that could not be carried over.
Convert config files between YAML, JSON and TOML
What you paste or drop
You paste a config or drop a file. The page lists YAML, JSON, TOML, INI and .env as inputs. The input is checked for syntax errors first, with line numbers, before any conversion happens. Everything runs in your browser. Nothing is uploaded, there is no job limit and you do not need an account. You pick the target format once the input is valid.
What you get and what to check
You get the same config in the target format and can copy it or download the file. Comments are not carried over, so keep your original if the comments matter. Check values that YAML reads in surprising ways. Unquoted words like NO, on, off and yes can turn into true or false, and strings that look like numbers or dates can change type. Compare the output with the source before you deploy it.
Flat formats and your final call
The target format is the main choice. INI and .env have no real nesting, so nested keys are flattened. In INI they use dot notation such as database.host, and in .env they become keys such as DATABASE_HOST. That flattening loses structure, so converting back later may not give the same shape. Which format a project should use, and whether the converted file behaves as before, stays your decision.
Questions before you run it
Which config formats are supported?
YAML, JSON, TOML, INI and .env files. You can convert from any of these to any other supported format. The converter auto-detects the input format from the file content.
Are comments preserved during conversion?
Comments are preserved when converting between formats that support them (YAML, TOML, INI). When converting to JSON, which has no comment syntax, comments are placed in a separate annotations file or dropped with a warning.
How are nested structures handled in flat formats?
INI and .env files do not support nesting natively. Nested YAML or JSON objects are flattened using dot notation (e.g., database.host) for INI sections and underscore-separated keys (e.g., DATABASE_HOST) for .env files.
Does the converter validate syntax before converting?
Yes. The input is parsed and validated first. Syntax errors are highlighted with line numbers and descriptions before any conversion is attempted. This catches issues like incorrect YAML indentation or missing TOML table headers.
Can I paste config content directly instead of uploading a file?
Yes. You can paste config content into the editor or drop a file. The converter detects the format from the content structure. If detection is ambiguous, you can select the format manually.