Skip to main content

INI to YAML Converter

Convert INI configuration text into YAML. Parses [section] headers (including dotted, nested sections), key = value pairs, quoted values and comments, and emits clean block-style YAML. Optional type coercion turns true/false and numeric strings into real YAML booleans and numbers. Runs entirely in your browser.

Input

Options

Output

YAML Output
 
Was this helpful?

Guides

The INI to YAML Converter turns INI / .cfg configuration text into clean, block-style YAML. Paste your INI on the left and the equivalent YAML appears instantly on the right, ready to copy or download. Everything happens in your browser — your configuration is never uploaded to a server.

How to use it

  1. Paste or type your INI configuration into the INI Input box, or click Try an example to load a sample.
  2. The YAML Output updates as you type.
  3. Use the copy or download button to grab the result (output.yaml).

What it understands

The converter reads standard INI structure and maps it onto a YAML document:

  • [section] headers become YAML mappings. Dotted headers such as [database.pool] nest deeper — database: then pool: beneath it.
  • key = value pairs become key: value. The line is split on the first =, so values may themselves contain =.
  • Comments on their own line (starting with ; or #) are ignored. Inline comments after a value can optionally be stripped.
  • Quoted values ("..." or '...') have their surrounding quotes removed, and a ; or # inside quotes is preserved rather than treated as a comment.
  • Global keys written before any section header sit at the top level of the YAML document.

Options

  • Type coercion — when on (the default), true/false/on/off/yes/no become real YAML booleans, numeric strings become numbers, and empty or null/none values become null. Turn it off to keep every value as a quoted string.
  • Strip inline comments — removes trailing ; ... or # ... notes from unquoted values (e.g. timeout = 30 ; seconds becomes 30).
  • Duplicate keys — choose whether a repeated key keeps only the last value (Last wins) or collects every value into a YAML sequence (Collect as array).

Values that could be misread as YAML — empty strings, tokens that look like booleans or numbers, or strings containing : — are automatically double-quoted so the output round-trips correctly.

Is my data safe?

Yes. The conversion runs entirely client-side in your browser using a self-contained parser. Nothing is sent over the network, which makes it safe for credentials, connection strings, and other sensitive configuration.

Why convert INI to YAML?

YAML is the configuration format of choice for modern tooling — Docker Compose, Kubernetes, GitHub Actions, and countless application frameworks. Migrating a legacy php.ini-style or .cfg file to YAML by hand is tedious and error-prone; this tool does it in one paste, preserving your nesting and types.

What about the reverse (YAML to INI)?

This tool handles the INI → YAML direction only. INI's flat, section-based model can't represent every YAML document (lists of maps, deeply nested structures), so a lossless round-trip isn't guaranteed in general.

iniyamlconverterconfigconfigurationparser

Use it from code

From 3 credits per call

REST API

curl -X POST https://api.iotools.cloud/v1/tool/ini-to-yaml-converter \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "iniSource": "[server]\nhost = localhost\nport = 8080\ndebug = tr…",
    "typeCoercion": "true",
    "stripComments": "true",
    "duplicateKeys": "last"
  }'

Swap in your own key from your account. The tool's fields are the body — no wrapper.

Ask an AI agent

Use the IOTools `ini-to-yaml-converter` tool (INI to YAML Converter) on this input:

YOUR_INPUT_HERE

Paste this at any agent connected to the IOTools MCP server, then add your input.

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.