INI to YAML Converter

Convert between INI and YAML format. Transform INI configuration files into YAML for Kubernetes, Docker Compose, and CI/CD pipelines.

What is INI to YAML Converter?

INI files use [section] headers and key=value pairs to organize configuration in a flat, section-based structure. They are common in Python (configparser), PHP, and desktop applications like Git and Mercurial. YAML offers richer semantics — nested structures, lists, comments, and type coercion — making it the standard for Kubernetes, Docker Compose, and CI/CD pipelines. This converter transforms INI sections into YAML nested mappings, handles dot-notation keys like ssl.mode as nested objects, and auto-detects value types (numbers, booleans). It also supports the reverse direction, flattening YAML hierarchies back into INI sections with dot-notation keys.

How to Use

  1. Use the direction toggle to choose INI → YAML or YAML → INI conversion.
  2. Paste your INI or YAML content into the input area.
  3. Click 'Convert' to parse the input and generate the output in the target format.
  4. Review the output — INI sections become YAML nested keys, and dot-notation keys create deeper nesting.
  5. Copy the result and use it in your Kubernetes ConfigMap, Docker Compose file, or application configuration.

Why Use This Tool?

Migrate legacy INI configurations to YAML for Kubernetes ConfigMaps, Docker Compose, and CI/CD pipelines
INI dot-notation keys (ssl.mode) are automatically expanded into proper YAML nested structures
Bidirectional conversion lets you go from INI to YAML and back without losing information
Automatic type detection converts numeric and boolean strings into proper YAML types
Browser-only processing keeps your configuration data private — nothing is uploaded or stored

Tips & Best Practices

  • INI sections become top-level YAML keys: [database] with host=localhost becomes database: host: localhost.
  • Dot notation in INI keys creates nested YAML: ssl.mode=require under [server] becomes server: ssl: mode: require.
  • When converting YAML to INI, lists are flattened using index notation: ports: [80, 443] becomes ports.0=80 and ports.1=443.
  • INI comments (# and ;) are excluded from the YAML output since they cannot be reliably associated with specific keys.

Frequently Asked Questions

How are INI sections and keys mapped to YAML?

Each INI section header (e.g., [database]) becomes a top-level YAML key. Key=value pairs within that section become nested YAML key: value pairs. Dot-notation keys like ssl.mode are expanded into deeper nesting, so [server] ssl.mode=require becomes server: ssl: mode: require in YAML.

When should I NOT use this converter?

Avoid this tool when your INI file uses features that YAML cannot represent cleanly — such as multi-line values, continuation characters, or interpolation (e.g., %(section)s references). Also, INI files with very flat structures (no sections) may not benefit from YAML conversion since the output will be equally flat.

How are INI values typed in YAML output?

The converter auto-detects value types: numeric strings become YAML integers or floats, true/false become YAML booleans, and everything else remains a string. Strings that could be misinterpreted as another type are automatically quoted.

Can I convert YAML back to INI?

Yes. Use the direction toggle to switch to YAML → INI mode. Top-level YAML keys become INI sections, nested key: value pairs become key=value pairs, and deeply nested objects use dot notation in the key names. Lists are flattened using index notation.

What about YAML lists?

When converting YAML to INI, lists are handled using index notation. For example, a YAML list under a key becomes key.0=value, key.1=value in the INI output. When converting INI to YAML, indexed keys (key.0, key.1) are kept as dot-notation keys rather than being auto-grouped into lists.

Is my configuration data sent to any server?

No. All parsing and conversion runs entirely in your browser. Your INI and YAML content never leave your device. No data is collected, stored, or transmitted to any server.

Real-world Examples

Server Configuration INI to YAML

Convert a server configuration INI file into YAML for a Docker Compose or Kubernetes deployment.

Input
[server]
host=0.0.0.0
port=8080
debug=false
workers=4

[database]
host=localhost
port=5432
name=myapp_production
pool_size=10
ssl.mode=require
Output
server:
  host: 0.0.0.0
  port: 8080
  debug: false
  workers: 4
database:
  host: localhost
  port: 5432
  name: myapp_production
  pool_size: 10
  ssl:
    mode: require

YAML Config to INI for Legacy System

Convert a YAML configuration back into INI format for a legacy application that only reads INI files.

Input
cache:
  driver: redis
  host: localhost
  port: 6379
  ttl: 3600
  prefix: myapp
logging:
  level: info
  file: /var/log/app.log
Output
[cache]
driver=redis
host=localhost
port=6379
ttl=3600
prefix=myapp

[logging]
level=info
file=/var/log/app.log

Related Tools