Favorite places of your favorite city
Home
Add to preferred sources on Google

YAML Formatter

Make YAML easier to read with consistent indentation. The formatter checks that the output keeps key order, scalar text, comments and references before it offers a result.

YAML input

YAML 1.2 Core · Up to 256 KiB and 32 documents. An initial BOM is removed and CRLF becomes LF.

Formatted YAML

Formatting runs in your browser. Text is kept in this editor until you clear it or leave the page.

Format YAML

  1. Paste one YAML document or a stream, or load the example.
  2. Choose two or four spaces and select Format YAML.
  3. Review and copy the checked result. You can select the text manually if clipboard access is unavailable.

What the formatter keeps

Mapping order, sequence items and document boundaries stay in place. Quoted values and the original spelling of numbers are checked before the result is shown.

An anchor names a node and an alias refers to it. The formatter checks which node each alias refers to without expanding the references.

Comments are checked for both text and placement. YAML characters inside a quoted string or block string remain part of its value.

Use the result in a review

Load the Build example to see a nested jobs list with consistent indentation and a comment still next to the same step.

A value such as 9007199254740993 needs to keep its digits. If formatting would change them, the tool withholds the candidate.

Supported YAML and limits

The tool accepts a bounded YAML 1.2 Core profile. Custom application tags, duplicate keys and unresolved aliases need a different editor.

Some valid sources have layouts the formatter cannot rewrite while keeping their details. An explanation appears instead of changed YAML. Configuration-specific validation belongs to the application that reads the file.

Local editing

Formatting runs in your browser. YAML drafts and results stay out of application storage and URLs. Copy writes the current checked output when you request it.

YAML formatting questions

Yes, within the document and text limits. The formatter checks that the output has the same document order and markers.

The tool checks comments, their placement and scalar spelling. If it cannot preserve those details, it shows an explanation and withholds the output.

It verifies the supported YAML syntax and formatting checks. Your application may impose additional rules about allowed fields and values.

Some layouts depend on specific scalar text, tags or comment placement. The formatter may be unable to rewrite those layouts within its supported profile.

Sources

JSON to TypeScript

Infer a TypeScript type alias from a JSON sample, then review, copy or download the code.

Open tool — JSON to TypeScript

JSON to YAML

Convert JSON to YAML locally while preserving number text and quoted strings; copy or download the complete result.

Open tool — JSON to YAML

YAML to JSON

Convert one YAML document locally to JSON with exact number text and bounded aliases, then copy or download the complete result.

Open tool — YAML to JSON

XML Formatter

Check namespace-aware XML 1.0, format or compact locally, and copy or download UTF-8 output.

Open tool — XML Formatter

JSON Formatter & Validator

Check JSON syntax, format or minify locally, and copy or download output while preserving original data tokens.

Open tool — JSON Formatter & Validator
View all tools in this category