PrivTab

JSON เป็น TypeScript

JSON เป็น TypeScript

ทำงานในเบราว์เซอร์ · ไม่ต้องอัปโหลด

ขณะนี้เครื่องมือและคำแนะนำในหน้านี้ยังเป็นภาษาอังกฤษ แต่ทำงานเหมือนกันทุกประการ: ทุกอย่างทำงานในเบราว์เซอร์ของคุณ

Generate TypeScript

  • ไม่มีสิ่งใดออกจากอุปกรณ์ของคุณ
  • เซิร์ฟเวอร์ไม่จำกัดขนาดไฟล์
  • ไม่ต้องสมัคร ไม่มีลายน้ำ
  • ฟรี

How to convert JSON to TypeScript

  1. Paste your JSON, or try the example.
  2. Choose interface or type, export and optional fields.
  3. Copy or download the TypeScript.

What you get

  • An interface for every object, named after its key.
  • Optional fields (name?: string) for fields missing from some array items.
  • Union types (string | null) where values differ.
  • Keys that aren't valid names (like "created-at") are quoted.

คำถามที่พบบ่อย

Is my JSON uploaded?

No. Everything happens in your browser, and the page is blocked from uploading anything.