CloudFormation Template Linter Tool - Client-Side cfn-lint Subset for YAML and JSON Templates
First Published:
Last Updated:
Free online CloudFormation template linter. Paste a YAML or JSON template, drop a .yaml / .json / .template file, or pick a preset, and this tool runs a subset of cfn-lint rules locally in your browser. Format is auto-detected; YAML short-form tags (!Ref, !Sub, !GetAtt, !Join, !If, !FindInMap, etc.) are fully supported. All processing happens entirely in your browser - your templates never leave your device.
IMPORTANT DISCLAIMER:
- This tool is provided "AS IS" without any warranties of any kind.
- This tool implements a subset of cfn-lint rules. Always run the official
cfn-lintCLI before production deployment. - Resource property type validation (from the CloudFormation Resource Specification) is out of scope for this MVP.
- Custom Resources, nested stacks, and full SAM transforms are not expanded.
- By using this tool, you accept full responsibility for any outcomes.
This tool uses client-side JavaScript for all processing. No data is transmitted to servers, no files are uploaded online, all processing happens locally in your browser. Once loaded, this tool continues to work even without an internet connection. For more details, please refer to our Web Tools Disclaimer.
Accepts .yaml, .yml, .json, .template (max 5 MB)
| Level | Rule | Path | Message |
|---|
Features
- Client-Side Processing: All linting runs locally in your browser; templates never touch a server.
- YAML Short-Form Tags: Full support for
!Ref,!Sub,!GetAtt,!Join,!Select,!Split,!FindInMap,!If,!Equals,!And,!Or,!Not,!Base64,!Cidr,!ImportValue,!Transform, and more. - Auto Format Detection: YAML and JSON are detected automatically; JSON falls back to YAML parsing if needed.
- Reference Integrity Checks: Validates that every
!Ref,!GetAtt,!FindInMap, and!Subvariable points to a declared Parameter, Resource, Mapping, or pseudo parameter. - IAM Wildcard Warnings: Flags
Resource: "*"andAction: "*"withEffect: Allowin IAM policies. - Unused Parameter / Condition Warnings: Detects declared-but-never-used entries.
- YAML ↔ JSON Conversion: Bundled converter expands short-form tags to
Fn::*form when converting to JSON. - Sample Presets: Good / Warnings / Errors samples load instantly for exploration.
- Debounced Auto-Lint: Linting runs automatically 400 ms after typing stops.
- Copyable Report: Copy all findings to the clipboard as plain text for pasting into PRs, tickets, or chat.
- Mobile Friendly: Responsive layout works on phones and tablets.
- Offline Capable: Once loaded, the tool continues to work without an internet connection.
How to Use
- Paste a CloudFormation template into the textarea, drop a file onto the drop zone, or click one of the three sample preset buttons.
- The format indicator shows whether YAML or JSON was detected.
- Lint runs automatically after a short pause, or you can click Run Lint to trigger it immediately.
- Review the findings table: each row lists Level, Rule ID, Path, and Message.
- Use Copy Report to copy all findings as text, or YAML ↔ JSON to convert between formats.
- Click Clear All to reset the tool.
Rules Implemented
- E1001: Template top-level structure. Requires a
Resourcessection and allows only the standard top-level keys (AWSTemplateFormatVersion,Description,Metadata,Parameters,Mappings,Conditions,Resources,Outputs,Transform,Rules). - E2001:
!Refto an undeclared Parameter. - E3001:
!Refor!GetAttto an undeclared Resource. - E3002: Logical IDs (resource / parameter / mapping / condition / output names) must be alphanumeric (A-Z, a-z, 0-9).
- E6001:
!FindInMapreferences a Mapping that is not defined. - E1017:
!Ifreferences a Condition that is not defined. - E1019:
!Subuses${Variable}that is not a Parameter, Resource, pseudo parameter, or local substitution variable. - W1020: IAM policy uses
Resource: "*"orAction: "*"withEffect: Allow(least-privilege warning). - W2001: A Parameter is declared but never referenced.
- W3001: A Condition is declared but never referenced.
Important Notes
- This is not a full cfn-lint replacement. Resource property type validation against the CloudFormation Resource Specification is out of scope for this MVP.
- Parameter
Defaultvalues are not used to evaluate intrinsic functions. Checks are purely structural. - SAM (
AWS::Serverless::*) resources are not expanded. Nested stacks and Custom Resources are linted as written. - The YAML ↔ JSON conversion normalizes short-form tags to their
Fn::*form. - Templates larger than 5 MB are rejected for file drops. Very large templates may take longer to lint depending on your browser.
- Always run the official
cfn-lintCLI andaws cloudformation validate-templatebefore deploying to production.
Third-Party Libraries:
- js-yaml (v4.1.0) - License: MIT (Vitaly Puzrin) - https://github.com/nodeca/js-yaml
References:
Tech Blog with curated related content
Web Tools Collection