JSON 转 TypeScript
JSON 转 TypeScript
在浏览器中运行 · 无需上传
此工具及本页说明目前仍为英文。功能完全相同:一切都在你的浏览器中运行。
Generate TypeScript
你的浏览器版本过旧,无法运行此工具。请更新浏览器,或使用最新版的 Chrome、Edge、Firefox 或 Safari。
- 任何内容都不会离开你的设备
- 服务器不限制文件大小
- 无需注册,无水印
- 免费
How to convert JSON to TypeScript
- Paste your JSON, or try the example.
- Choose interface or type, export and optional fields.
- 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.