Ansible inventory converter
Convert an Ansible INI inventory to YAML, or a YAML inventory back to INI.
Ansible inventory converter
Paste an Ansible inventory and this tool converts it between the classic INI format and the structured YAML format Ansible also accepts. Group headers, host lines, group variables and children relationships all carry across, so a hand-written INI inventory becomes a proper all/children YAML tree, and a YAML inventory converts back to plain INI sections for tools or teammates that still expect it.
Host ranges written in square brackets, like web[01:50].example.com or db-[a:f].example.com, expand into individual host names when "Expand host ranges" is on, with zero-padding and letter sequences handled the same way Ansible itself expands them. Turn "Keep host and group variables" off to strip ansible_user, http_port and similar assignments and see only the group structure. "Sort groups and hosts" orders everything alphabetically instead of keeping the file's original order, and "Omit empty groups" drops any section that ends up with no hosts, variables or children after conversion. The indent width option sets how many spaces the YAML output uses per level.
Hosts listed before any group header land in the implicit ungrouped group, matching how Ansible itself treats them. Comment lines starting with a semicolon or hash, and blank lines, are ignored on the INI side. The converter is line-ending agnostic, so a file saved on Windows works the same as one saved on Linux or macOS, and the tally under the output reports the number of groups, the number of hosts and the size of the result as you type.
Everything runs locally in your browser. The inventory, hostnames and any variables in it are never uploaded anywhere, which matters for a file that can carry internal hostnames and credentials-adjacent settings. When you are done, copy the result, download it as a .txt file, or send the output straight back into the input to convert it again.