YAML
Validate, format, and convert YAML to JSON locally in your browser.
{
"name": "renderhub",
"type": "ssg",
"features": [
"preview",
"edit",
"download"
],
"ads": {
"provider": "adsense",
"enabled": true
}
}Tools
- Format — re-emit parsed YAML with consistent indentation.
- Download JSON — save the parsed structure as a
.jsonfile. - Toggle the preview between JSON and YAML on the right.
YAML in one paragraph
YAML (YAML Ain't Markup Language) is a human-friendly text format for configuration and small structured documents. Compared to JSON it adds comments, multi-line strings, anchors and aliases, and most importantly indentation-based nesting, which makes hand-edited config files easier to read. The trade-off is that YAML's grammar is much larger and more ambiguous than JSON's, so a tool that validates and reformats it pays for itself quickly.
Mistakes that bite everyone at least once
- Tabs vs spaces. YAML forbids tab indentation. Editors that silently insert tabs produce errors that look like the YAML parser is broken.
- The Norway problem. Unquoted
NO,yes,off,onare parsed as booleans by YAML 1.1, which is what most libraries still use. Always quote country codes and string-like flags. - Implicit numbers. Leading zeros, version strings like
1.10, and large integers may be coerced to numbers and lose precision. Quote them. - Indentation drift. Two spaces, four spaces — pick one and stick with it. A document that mixes both parses, but the structure may not be what you intended.
YAML vs JSON
Use YAML when a human will edit the file frequently and a few extra characters of comments or formatting matter — CI pipelines, Kubernetes manifests, application config. Use JSON for anything that crosses a network or is generated by a machine. This tool converts YAML to JSON in a single click, which is the most reliable way to feed a YAML document to a system that only speaks JSON.
YAML 한 문단
YAML(YAML Ain't Markup Language)은 설정과 작은 구조화 문서에 적합한 사람 친화적인 텍스트 포맷입니다. JSON과 비교하면 주석, 여러 줄 문자열, 앵커와 별칭, 그리고 가장 중요하게는 들여쓰기 기반 중첩을 더해서 사람이 직접 편집하는 설정 파일이 훨씬 읽기 쉬워집니다. 대신 YAML의 문법은 JSON보다 훨씬 크고 모호하기 때문에, 검증하고 다시 포맷팅해 주는 도구가 금세 본전을 뽑습니다.
누구나 한 번쯤 당하는 실수
- 탭 vs 공백. YAML은 탭 들여쓰기를 금지합니다. 무심코 탭을 삽입하는 에디터는 마치 파서가 고장 난 것처럼 보이는 에러를 만듭니다.
- 노르웨이 문제. 인용되지 않은
NO,yes,off,on은 YAML 1.1에서 불리언으로 파싱됩니다. 대부분의 라이브러리가 아직 1.1을 씁니다. 국가 코드와 문자열처럼 보이는 플래그는 항상 인용하세요. - 암시적 숫자. 앞에 0이 붙은 값,
1.10같은 버전 문자열, 큰 정수는 숫자로 강제 변환되어 정밀도를 잃을 수 있습니다. 인용하세요. - 들여쓰기 표류. 두 칸이든 네 칸이든 하나만 골라서 일관되게 쓰세요. 두 가지를 섞은 문서도 파싱은 되지만, 의도한 구조와 다를 수 있습니다.
YAML vs JSON
사람이 자주 편집하는 파일이고 주석이나 포맷팅이 의미가 있다면 YAML을 쓰세요 — CI 파이프라인, 쿠버네티스 매니페스트, 애플리케이션 설정. 네트워크를 건너거나 기계가 생성하는 모든 것에는 JSON을 쓰세요. 이 도구는 클릭 한 번으로 YAML을 JSON으로 변환합니다 — JSON만 받는 시스템에 YAML 문서를 넘기는 가장 안전한 방법입니다.