How to use
- Paste text, open a UTF-8 file, or try the Sample.
- Choose the input and settings, then run the tool or enable Auto run.
- Review the result, then copy or download it. Changing the input invalidates the previous result.
YAML Formatter
Format YAML with consistent indentation while preserving comments and anchors.
Processing runs in your browser. Your input is not sent to DevToolsy.
How it works
Format YAML 1.2 configuration files, including multi-document streams. The parser rejects invalid syntax and duplicate keys before formatting. Anchors, aliases and custom tags remain in the text.
# Application settings
app: {name: DevToolsy, enabled: true}
defaults: &defaults
retries: 3
timeout: 5000
worker:
<<: *defaults
queue: tasks
---
environment: production
# Application settings
app: { name: DevToolsy, enabled: true }
defaults: &defaults
retries: 3
timeout: 5000
worker:
<<: *defaults
queue: tasks
---
environment: production
Format YAML with consistent indentation while preserving comments and anchors.
Options and data fidelity
Choose indentation and line width. Formatting preserves numeric tokens and does not expand aliases. It does not validate Kubernetes, CI or application-specific configuration rules.
Working with the result
This page produces readable YAML. Use the separate YAML to JSON tool for conversion; it has different restrictions for tags, aliases and numeric values.
Review the result, then copy or download it. Changing the input invalidates the previous result.
UTF-8 input up to 1 MiB per document, output up to 8 MiB. JSONPath and Schema: 5-second timeout; other tools: 30 seconds.
Frequently asked questions
Can I format multiple YAML documents?
Format YAML 1.2 configuration files, including multi-document streams. The parser rejects invalid syntax and duplicate keys before formatting. Anchors, aliases and custom tags remain in the text.
What does YAML formatting preserve?
Choose indentation and line width. Formatting preserves numeric tokens and does not expand aliases. It does not validate Kubernetes, CI or application-specific configuration rules.
Is this a YAML to JSON converter?
No. This page produces readable YAML. Use the separate YAML to JSON tool for conversion; it has different restrictions for tags, aliases and numeric values.
Is my input uploaded?
Processing runs in your browser. Your input is not sent to DevToolsy.
Can I open a local file?
UTF-8 input up to 1 MiB · output up to 8 MiB