skillfed

cfn-flip

Convert AWS CloudFormation templates between JSON and YAML formats

cfn-flip v1.3.0 2.7M downloads/30d#2,947 on PyPI1,000
Permissive license Apache2 Abandoned released

What it is and what it does

cfn-flip is a command-line tool and Python library that converts AWS CloudFormation templates between JSON and YAML formats. It automatically detects the input format and converts to the opposite, optionally using YAML's short-form function syntax. The tool also supports template cleanup operations and can be configured to control output line width.

You can use it as a standalone CLI tool (cfn-flip) to process template files or stdin/stdout, or import its functions (flip, to_yaml, to_json) into your own Python code. The package depends on Click, PyYAML, and six—though the project is no longer maintained.

Use it for:

  • Convert CloudFormation templates from JSON to YAML or vice versa in build pipelines or deployment scripts
  • Normalize template formatting and apply CloudFormation-specific cleanup rules via the --clean flag
  • Integrate template format conversion into Python infrastructure-as-code tools without external process calls
  • Batch-process multiple CloudFormation templates to a preferred format for version control or documentation

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Converts AWS CloudFormation templates between JSON and YAML formats, with support for short-form YAML function syntax and optional template cleanup.

No—not for new projects. The package is archived and abandoned since 2021-10-07, with no updates for years. While it has low install friction and permissive licensing, the lack of maintenance means it will not handle new CloudFormation features, receive security patches, or stay compatible with evolving dependencies. Use it only if maintaining legacy code that already depends on it.

Install

cfn-flip on PyPI

pip

pip install cfn-flip

uv

uv add cfn-flip

poetry

poetry add cfn-flip

Installing cfn-flip

Before you install

Low install friction with three lightweight dependencies (Click, PyYAML, six). However, the project is archived and abandoned, with no releases since 2021-10-07 — it will not receive updates or security patches going forward.

License in practice

Licensed under Apache2 (permissive), so you can use, modify, and distribute the package freely in commercial and private projects without restriction.

Quickstart

pip install cfn-flip

from cfn_flip import flip, to_yaml, to_json

json_template = '{"key": "value"}'
yaml_template = to_yaml(json_template)
original = flip(yaml_template)

Verify before relying

  • Whether the package works correctly with modern AWS CloudFormation template features added after 2021-10-07
  • Compatibility with current versions of PyYAML and Click, given the long time since last release

Package facts

License Apache2 (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 3 — Click, PyYAML, six
Maintenance abandoned — 1,772 days since the last release
Last repo commit (repository archived)
First released
Downloads 2,674,349/month — #2,947 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: cfn_flip-1.3.0-py3-none-any.whl

Tags

cloudformation template converterjson yaml conversion toolcfn template format flipaws cloudformation formattemplate json to yamlcloudformation yaml jsoncfn-flip command line
cloudformationtemplate-conversionabandoned

More Build Tools packages