YAML을 JSON으로 변환

역변환이 필요하신가요?
JSON to YAML Converter

YAML 입력

1

JSON 출력

YAML 데이터를 입력하여 JSON(으)로 변환하세요

변환된 데이터가 여기에 표시됩니다

YAML을 JSON으로 변환하는 방법(온라인) — 단계별 가이드

이 YAML→JSON 변환기로 설정 파일, Kubernetes 매니페스트, CI/CD 설정을 JSON으로 변환해 API 및 툴링에 활용하세요.

  1. 1단계 – YAML 붙여넣기/업로드

    • 왼쪽 에디터에 YAML을 붙여넣거나 .yaml/.yml 파일을 업로드하세요.
    • Kubernetes, Docker Compose, GitHub Actions 워크플로우 등 YAML에 사용할 수 있습니다.
    • ---로 구분된 멀티 문서 YAML은 JSON 배열로 변환됩니다.
  2. 2단계 – 변환 결과 확인

    • 오른쪽에 JSON이 표시되며 중첩 구조와 데이터 타입을 보존합니다.
    • YAML 주석은 제거됩니다(JSON은 주석을 지원하지 않음).
    • 배열/객체/스칼라 값이 올바르게 변환되었는지 확인하세요.
  3. 3단계 – 예외 케이스 처리

    • 복잡한 파일에서는 YAML 앵커/별칭이 수동 조정이 필요할 수 있습니다.
    • 불리언(true/false, yes/no)은 JSON 불리언으로 정규화됩니다.
    • 숫자와 문자열은 JSON 형식으로 유지됩니다.
  4. 4단계 – JSON 복사/다운로드

    • “복사”로 JSON을 클립보드에 보냅니다.
    • 또는 “다운로드”로 .json 파일로 저장합니다.
    • REST API, 프런트엔드 앱, JSON 입력이 필요한 모든 도구에서 사용할 수 있습니다.

Quick tips for YAML to JSON

  • Ensure indentation is consistent in your YAML; most conversion errors come from bad indent levels.
  • Multi-document YAML will be converted to a JSON array, which is ideal for lists of configs or resources.
  • After converting, run the JSON through the validator or formatter to catch any remaining structural issues.
Example: YAML to JSON
# YAML input
apiVersion: v1
kind: ConfigMap
metadata:
  name: app-config
data:
  database_url: postgres://localhost/db
  debug: true
  ports:
    - 8080
    - 8081

// JSON output
{
  "apiVersion": "v1",
  "kind": "ConfigMap",
  "metadata": {
    "name": "app-config"
  },
  "data": {
    "database_url": "postgres://localhost/db",
    "debug": true,
    "ports": [8080, 8081]
  }
}

Related YAML & JSON tools

Convert between formats and work with configuration files using these complementary tools.

자주 묻는 질문

What YAML features are supported in the conversion?

The converter supports standard YAML features including scalars, sequences (arrays), mappings (objects), multi-line strings, and basic YAML syntax. Complex YAML features like anchors and references may have limited support.

How are YAML comments handled during conversion?

YAML comments are typically stripped during conversion to JSON since JSON doesn't support comments. The conversion focuses on the data structure rather than preserving comments.

Can I convert complex nested YAML structures?

Yes, the converter can handle deeply nested YAML structures with multiple levels of objects and arrays. The resulting JSON will maintain the same hierarchical structure.

What happens to YAML data types during conversion?

YAML data types are converted to their JSON equivalents: strings remain strings, numbers become JSON numbers, booleans stay as booleans, and null values are preserved. YAML's additional data types are converted to their closest JSON representation.

YAML을 JSON으로 변환 | JSONSwiss