広告が嫌いですか? 行く 広告なし 今日

YAML Formatter & Beautifier

開発者
広告 ・ 取り除く?

フォーマットオプション

Conversions

広告 ・ 取り除く?

ガイド

YAML Formatter & Beautifier

YAML Formatter & Beautifier

Format and beautify YAML files with consistent indentation, configurable quoting, and key sorting. Paste your YAML content and instantly see properly formatted output with validation, error highlighting, and statistics. Export as JSON, TOML, or Properties format.

使い方

Paste your YAML content into the input area. The formatter processes it instantly with your chosen options: indent size (2 or 4 spaces), quote style (auto, double, single, or bare), alphabetical key sorting, array style (block or flow), and line width. View validation results with error line numbers. Copy the formatted output or download as .yaml or .yml file. Convert to JSON, TOML, or Properties format with one click.

特徴

  • Consistent Indentation — Normalize YAML indentation to 2 or 4 spaces throughout the entire document. Fixes mixed indentation and alignment issues.
  • Quote Style Control — Auto-quote only when needed, always use double or single quotes for strings, or remove unnecessary quotes. Handles the YAML quoting rules correctly.
  • キーの並べ替え — Optionally sort keys alphabetically within each nesting level for consistent, organized configuration files.
  • Array Style — Choose between block style (each item on a new line with -) or flow/inline style ([item1, item2]) for short arrays.
  • 検証 — Detects invalid YAML with error messages and line numbers. Shows document statistics: total keys, max nesting depth, array count, total lines.
  • Export Formats — Convert YAML to JSON, TOML (best effort), or Properties (flat key=value with dot notation for nesting). Each with copy button.
  • 追加オプション — Collapse empty collections, set line width for wrapping, strip comments, trim trailing whitespace.
  • クイックリファレンス — Collapsible YAML syntax guide covering common gotchas (Norway problem: NO → false), indentation rules, and multi-line string styles (| literal, > folded).

YAML Syntax

YAML uses indentation to represent nesting (spaces only, never tabs). Keys and values are separated by colons: key: value. Arrays use dashes: - item. Strings can be bare, single-quoted, or double-quoted. Multi-line strings use | (literal, preserves newlines) or > (folded, joins lines). Comments start with #. YAML is commonly used in Docker Compose, Kubernetes, GitHub Actions, Ansible, and many configuration files.

広告 ・ 取り除く?

What is the Norway problem in YAML?

The ‘Norway problem’ is a famous YAML gotcha: bare values like NO, YES, ON, OFF, true, false are automatically parsed as booleans. This means a country code mapping like ‘NO: Norway’ is interpreted as ‘false: Norway.’ Similarly, version numbers like 1.0 become floats. The fix is quoting: ‘NO’: Norway, ‘1.0’: version. This formatter can normalize quoting to prevent these issues — use ‘Always double-quote’ or ‘Always single-quote’ mode for safety.

What is the difference between | and > in YAML?

The pipe (|) creates a literal block scalar — it preserves newlines exactly as written. Each line in the block becomes a separate line in the resulting string. The greater-than sign (>) creates a folded block scalar — it joins consecutive lines with spaces, treating blank lines as paragraph separators. Use | for content where line breaks matter (scripts, code, formatted text). Use > for long text that should flow as a paragraph.

Can I use tabs for YAML indentation?

No — the YAML specification explicitly forbids tab characters for indentation. Only spaces are allowed. This is one of the most common sources of YAML errors, especially when copying from other formats or editors that use tabs. This formatter automatically uses spaces (2 or 4, configurable) and will flag tab-based indentation as an error. If your source YAML has tabs, paste it here to convert to space-based indentation.

Is my YAML data sent to a server?

No — all parsing, formatting, and validation happens in your browser using JavaScript. Your YAML content never leaves your device. This is important because YAML files often contain sensitive configuration: API keys, database credentials, deployment secrets, and infrastructure settings. All processing runs entirely client-side with no API calls or data storage.

広告なしで楽しみたいですか? 今すぐ広告なしで

拡張機能をインストールする

お気に入りのブラウザにIOツールを追加して、すぐにアクセスし、検索を高速化します。

に追加 Chrome拡張機能 に追加 エッジ拡張 に追加 Firefox 拡張機能 に追加 Opera 拡張機能

スコアボードが到着しました!

スコアボード ゲームを追跡する楽しい方法です。すべてのデータはブラウザに保存されます。さらに多くの機能がまもなく登場します!

広告 ・ 取り除く?
広告 ・ 取り除く?
広告 ・ 取り除く?

ニュースコーナー 技術ハイライト付き

参加する

価値ある無料ツールの提供を継続するためにご協力ください

コーヒーを買って
広告 ・ 取り除く?