> codebench_TOOL: HomeLOCAL-ONLY⌘K Switch

YAML Validator

Tool guide

Validate YAML syntax with error reporting

Input: This tool processes input in your browser. Check in Network (opens in a new tab)

Keep or fold a YAML line break

Input (YAML)
Output (Validation Result)
Paste YAML on the left, then press ⌘Enter

Paste your YAML and get instant syntax validation with precise line and column error reporting. Supports multi-document YAML (--- separators) and strict mode for detecting duplicate keys. Valid YAML is displayed as formatted JSON. All processing runs in your browser.

How to use it

  1. Select Run example to compare two ways of wrapping a notice. This leaves the YAML in your editor unchanged.
  2. For a manual check, paste the sample as one document and choose Validate. Read the two quoted values in the JSON output.
  3. If this notice is going into a single-line banner, use the folded value. Use the literal value if the display needs a break between the sentences.

Worked example

Example input
literal: |-
  Search is paused.
  Saved links still work.
folded: >-
  Search is paused.
  Saved links still work.
Example output
{
  "literal": "Search is paused.\nSaved links still work.",
  "folded": "Search is paused. Saved links still work."
}

The visible \n in serialized JSON represents one line feed in the parsed literal string. The folded string has a space there instead.

What to watch for

Folding ordinary lines to spaces is not a rule for every line: blank or more-indented lines behave differently. Inspect the parsed value after editing the block.

Frequently asked question

Why does neither notice end in a line feed?
The minus sign in |- and >- strips trailing line breaks. Remove the minus sign from either marker and validate this same sample to see a final \n in that value.

Browse Convert tools

Further reading

> codebench $Ctrl+Enter Run