도구 가이드
developer 무료 회원가입 불필요

YAML 유효성 검사기 및 포매터

YAML 구문을 유효성 검사하고 형식이 지정된 JSON으로 변환하세요 — 브라우저에서 완전히 실행됩니다.

도구를 불러오는 중…

이 도구에 대해

YAML을 붙여넣어 유효한지 즉시 확인하세요. 내장 파서는 스칼라(문자열, 숫자, 불리언, null), 들여쓰기를 통한 중첩 객체, - 접두사의 시퀀스를 처리합니다. JSON 보기로 전환하면 YAML이 형식화된 JSON으로 변환됩니다. 오류 메시지에는 빠른 디버깅을 위한 줄 번호가 표시됩니다.

사용 방법

  1. 1 입력 텍스트 영역에 YAML을 붙여넣으세요.
  2. 2 '유효성 검사'를 클릭하여 구문 오류를 확인하세요.
  3. 3 'JSON으로 변환'을 클릭하여 JSON 표현을 보세요.
  4. 4 표시된 오류를 수정하세요 — 오류 메시지에 줄 번호가 포함됩니다.

What YAML is and why indentation breaks it

YAML ("YAML Ain't Markup Language") is a human-readable data format used for configuration files almost everywhere — Docker Compose, Kubernetes, GitHub Actions, Ansible, and countless app settings. Its appeal is that it looks clean: no braces, no quotes most of the time, just keys, values, and structure expressed through indentation. That same strength is its biggest trap. Because YAML uses leading spaces to show nesting, a single misaligned space or a stray tab can completely change what your file means — or stop it from parsing at all. This validator reads your YAML, builds the same nested structure a parser would, and tells you whether it is well-formed, pointing to the line where it fails.

How the validator reads your file

The tool walks your YAML line by line. It first strips out blank lines and comments — including inline comments after a #, while being careful to leave a # alone when it sits inside a quoted string. For each remaining line it records the indentation depth, then assembles the data: a line like key: value becomes a mapping entry, a line starting with - becomes a list item, and deeper-indented lines become children of the line above. Scalar values are interpreted with their natural types, so true and yes become booleans, 30 becomes a number, ~ and null become null, and quoted text stays a string. If a line is indented inconsistently — claiming to be a child but not lining up with anything — the parser raises an error naming the offending line number.

A worked example

Consider this input:

YAMLParsed meaning
name: John Doestring "John Doe"
age: 30number 30
active: trueboolean true
tags:
  - admin
  - user
list ["admin", "user"]
address:
  city: Seoul
nested object {city: "Seoul"}

Press Convert to JSON and the tool emits the equivalent JSON, which makes the structure explicit with braces and brackets — useful both for confirming you got the nesting right and for feeding the data to a system that expects JSON. The age appears as a bare 30, not "30", confirming YAML inferred a number.

Use cases

  • Catching CI/CD failures before you push. A broken GitHub Actions or GitLab CI file fails the whole pipeline. Validating locally saves a round-trip of failed builds.
  • Debugging Kubernetes and Docker Compose manifests. These are deeply nested; one wrong indent on a volumes or env block silently drops settings.
  • Converting config to JSON. When an API or script wants JSON but your data lives in YAML, the converter gives you a clean translation.
  • Teaching and learning YAML. Seeing how indentation maps to objects and lists makes the rules concrete.

Common mistakes this catches

  • Tabs instead of spaces. YAML forbids tabs for indentation. They look identical to spaces in many editors but cause parse errors — set your editor to insert spaces.
  • Inconsistent nesting depth. If sibling keys are indented by different amounts, the structure becomes ambiguous. The validator flags the line where the indentation stops making sense.
  • Unquoted special values. A version number like 1.10 may be read as the number 1.1, and a country code like NO can become the boolean false. Quote values you intend to stay strings.
  • Forgetting the space after the colon. key:value is not a mapping; YAML needs key: value with a space. This is one of the most frequent typos.

Scope and privacy

This is a lightweight structural validator built for the common YAML you write by hand: mappings, lists, nested objects, scalars with type inference, and block text. It is not a full implementation of every corner of the YAML specification — exotic features like anchors, aliases, and multi-document streams are outside its scope — so for those, treat a clean result as a strong sanity check rather than a formal guarantee. Everything runs in your browser: your YAML is parsed locally and never uploaded, so it is safe to paste configuration that contains internal hostnames or settings.

자주 묻는 질문

{# Alpine.js — self-hosted. (The previous jsdelivr CDN tag had a stale SRI integrity hash, so the browser refused to run it and window.Alpine was never defined — silently breaking every FAQ accordion and Alpine tool.) #}