Formats
YAML Formatter
Format, validate, and beautify YAML documents.
How to use it
- Open Devly from the wrench in your menu bar, or press ⌃⌥⌘D. Press ⌘P, type YAML Formatter and press Return.
- Paste or type your text into Input.
- Adjust the Options on the right if you need to. The defaults are listed below.
- Press Format, or ⌘↵.
- Use Copy or ⇧⌘C to copy the result. ⌘L clears everything.
Options
| Option | Values | Default |
|---|---|---|
| Indent SpacesNumber of spaces for indentation | 1–8 | 2 |
| Sort keysSort object keys alphabetically | On or off | Off |
| Add document start (---)Add YAML document start marker | On or off | Off |
Example
Real output from Devly, with the default options.
Input
name: devly
version: 2.3.0
tools: 65
platforms:
- macOS
price: {usd: 4.99, once: true}name: devly
platforms:
- macOS
price:
once: |-
true
usd: |-
4.99
tools: |-
65
version: 2.3.0
From Terminal
With the free command-line tool installed:
Terminal
devly yamlformat --path input.txt # or pipe text in pbpaste | devly yamlformat
Quick Switch also finds it by: yaml, yml, format, validate, beautify.
More Formats tools
JSON FormatterFormat, validate, and minify JSON with syntax highlightingJSON Path QueryQuery JSON data using JSONPath expressionsJSON ↔ YAMLConvert between JSON and YAML formatsXML FormatterFormat, validate, and beautify XML documentsXML ↔ JSONConvert between XML and JSON formatsCSV → JSONConvert CSV data to JSON format