Guides
Choose a configuration file format
Check which formats the target tool accepts first. If several are supported, choose one the team can validate and maintain safely.
Which format should you choose?
Choose by the role each file plays in your workflow.
- APIs and web data exchange → JSON
- Readable nested configuration → YAML
- Configuration centered on keys and values → TOML
- Tool requires one format → follow its specification
Prioritize tool support
Choose configuration formats according to the application, library, CI system, and hosting environment. Confirm supported formats and specification versions.
Automate syntax validation
JSON, YAML, and TOML can all fail to load because of syntax or type errors. Validate on save or in CI, and keep credentials out of configuration files in the repository.
Formats to consider
JSON
Good for: APIs or settings that accept JSON
Less suitable for: Human-maintained settings that require comments
YAML
Good for: Nested configuration maintained by people
Less suitable for: Simple exchange where indentation errors are a concern
TOML
Good for: Configuration organized around keys and values
Less suitable for: Tools that specifically require JSON or YAML
Before you export
- Check the format and specification version supported by the target tool.
- Do not store credentials or private keys in the repository.