cfn-flip
Convert AWS CloudFormation templates between JSON and YAML formats
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-flipuv
uv add cfn-flippoetry
poetry add cfn-flipInstalling 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
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
cfn-lintValidates AWS CloudFormation templates in YAML…
permissive · top 1,000 on PyPI
aws-sam-translatorTransforms AWS Serverless Application Model…
permissive · top 1,000 on PyPI
crhelperSimplifies writing CloudFormation custom…
permissive · top 15,000 on PyPI
cloudformation-cliA command-line tool for authoring and managing…
permissive · top 15,000 on PyPI
xmltojsonConverts XML documents to JSON format via a…
permissive · top 15,000 on PyPI
awslabs.aws-iac-mcp-serverProvides an MCP server that validates…
permissive · top 15,000 on PyPI
ruamel.yaml.jinja2Enables Jinja2 templating within YAML files by…
permissive · top 5,000 on PyPI
aws-cdk.custom-resourcesProvides a framework for implementing AWS…
permissive · top 15,000 on PyPI
troposphereTroposphere is a Python library that generates…
permissive · top 5,000 on PyPI
sceptre-cmd-resolverA Sceptre resolver plugin that executes shell…
permissive · top 15,000 on PyPI