Code tool

YAML Validator

Paste YAML or open a local UTF-8 file, find the first error location, format the document or convert it to JSON.

In-browser processingNo account requiredPrivacy details ↗

Uses the approved yaml 2.9.1 library: strict parsing, unique keys and no custom tag handlers. Default YAML 1.2 is retained; an explicit version directive is honored. Custom or unresolved tags and parser warnings are rejected. One document only. Input: 100,000 characters; file: 400,000 bytes, UTF-8 only. Output: 200,000 characters; AST depth: 100; nodes: 20,000; aliases: 100, plus the library expansion limit of 100. Parser diagnostics retain the library’s wording.

Choose an action after entering YAML.

Format uses Document.toString with indent 2 and lineWidth 0 (no added line wrapping); existing flow/block styles may remain. Parsed comments, anchors and aliases are retained by the document model, but spacing, quotes, comment placement and bytes may change. JSON uses two-space indentation and expands bounded aliases; comments and anchors are not represented. Non-string keys, cycles, non-finite numbers, negative zero, unsafe integers, dates, binary data and other non-JSON values are rejected rather than coerced.

A QUICK WALKTHROUGH

How to use this tool

  1. Paste up to 100,000 characters or open a UTF-8 file up to 400,000 bytes.
  2. Choose Validate, Format YAML or JSON.
  3. Read the first error location or the bounded output; Clear empties both input and output.

Parsing and limits

Uses the approved yaml 2.9.1 library: strict parsing, unique keys and no custom tag handlers. Default YAML 1.2 is retained; an explicit version directive is honored. Custom or unresolved tags and parser warnings are rejected. One document only. Input: 100,000 characters; file: 400,000 bytes, UTF-8 only. Output: 200,000 characters; AST depth: 100; nodes: 20,000; aliases: 100, plus the library expansion limit of 100. Parser diagnostics retain the library’s wording.

Formatting and JSON

Format uses Document.toString with indent 2 and lineWidth 0 (no added line wrapping); existing flow/block styles may remain. Parsed comments, anchors and aliases are retained by the document model, but spacing, quotes, comment placement and bytes may change. JSON uses two-space indentation and expands bounded aliases; comments and anchors are not represented. Non-string keys, cycles, non-finite numbers, negative zero, unsafe integers, dates, binary data and other non-JSON values are rejected rather than coerced.

GOOD TO KNOW

Common questions

Are custom tags executed?

No. No custom tag handlers are installed and custom tags are rejected. Processing stays in the browser without upload or storage.

Is formatting byte-preserving?

No. Keep your original file if exact bytes matter. Formatted output is shown separately and does not overwrite the input or local file.