JSON 샘플에서 중첩 타입, 배열, 선택적 필드가 포함된 TypeScript 인터페이스를 생성합니다. 브라우저에서 실행됩니다.
JSON to TS 사용 방법
JSON 객체나 배열을 붙여넣으세요.
선택적으로 루트 인터페이스 이름을 설정하세요.
생성된 TypeScript 인터페이스를 복사하세요.
This is a JSON to TypeScript generator that infers a set of interfaces from an example JSON object or array, so you can paste an API response and get ready-to-use types instead of writing them by hand.
It is a big time-saver when you are consuming an API or a config file: paste a response, optionally name the root interface, and copy clean TypeScript straight into your code.
Generation runs entirely in your browser, so your data never leaves your device, which matters when the sample contains real values.
It handles real-world shapes: nested objects become their own named interfaces referenced from the parent, arrays of objects are merged into one interface, and union types are produced where values vary.
When the objects in an array do not all have the same keys, the keys missing from some elements are marked optional with a question mark, which matches how the data actually behaves and keeps the types honest.
One important point: it infers a shape from the single sample you give it, rather than enforcing a schema. If a field is sometimes null or absent in real data but not in your sample, the generated type will not know that, so use a representative example.
자주 묻는 질문
각 중첩 객체가 별도의 명명된 인터페이스가 되고 부모에서 참조됩니다. 결과가 깔끔하고 재사용 가능합니다.
객체 배열은 하나의 인터페이스로 병합되고 일부 요소에서 누락된 키는 선택적으로 표시됩니다. 혼합된 원시 타입의 배열은 유니온 요소 타입이 됩니다.
아니요. 타입은 브라우저에서 완전히 생성되므로 데이터가 기기 밖으로 나가지 않습니다.
이 도구 임베드하기
이 도구를 직접 운영하는 웹사이트에 추가하세요. 아래 코드를 복사하면 자동으로 최신 상태로 유지됩니다.
<iframe src="https://monu.tools/embed/ko/json-to-typescript" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>관련 도구
잘못된 입력에 대한 명확한 오류 메시지와 함께 온라인에서 JSON을 포맷하고 보기 좋게 정리하며 유효성을 검사합니다.
브라우저에서 JSON을 압축하고 유효성을 검사하여 절약된 바이트 수를 확인합니다.
JSON을 CSV로, CSV를 JSON으로 양방향 변환합니다. 구분자 선택, 따옴표 처리, 결과 복사 기능을 제공하며 모든 작업이 브라우저에서 실행됩니다.
YAML을 JSON으로, JSON을 YAML로 양방향 변환합니다. 변환 중 유효성을 검사하고 명확한 오류 메시지를 표시합니다. 모든 작업이 브라우저에서 실행됩니다.