Convert JSON into developer models instantly β in your browser.
JSONCraft takes raw JSON and generates production-ready data models across multiple languages and frameworks. No installs, no backend, no data ever leaves your machine.
π Live demo: js0ncraft.netlify.app
- 10 output formats β TypeScript, Python, GraphQL, SQL, Go, Rust, Java, Kotlin, Zod, Prisma
- Live conversion mode β output updates as you type
- Drag & drop JSON files directly onto the editor
- Import from URL β fetch JSON from any API endpoint
- JSON formatter β pretty-print with one click
- JSON validator β instant feedback on syntax errors
- Nested object support β deeply nested structures handled automatically
- Array detection β typed arrays and object arrays both supported
- Smart type inference β distinguishes
intvsfloat,StringvsAny, etc. - Copy & download β download uses the correct file extension per language
- Dark / light theme
- Zero dependencies β pure HTML, CSS, and JavaScript
- Offline capable β clone and open
index.html, no server needed
| Format | Output |
|---|---|
| TypeScript | interface definitions |
| Python | @dataclass classes with type hints |
| GraphQL | type schema definitions |
| SQL | CREATE TABLE statements |
| Go | struct with JSON tags |
| Rust | struct with Serde derives |
| Java | Classes with getters and setters |
| Kotlin | data class definitions |
| Zod | Schema with z.infer<> type exports |
| Prisma | model schema blocks |
Input:
{
"user": {
"id": 1,
"name": "Alex",
"email": "alex@mail.com",
"active": true,
"score": 9.5
}
}TypeScript output:
interface Model {
user: ModelUser
}
interface ModelUser {
id: number
name: string
email: string
active: boolean
score: number
}Go output:
package main
type Model struct {
User ModelUser `json:"user"`
}
type ModelUser struct {
Id int `json:"id"`
Name string `json:"name"`
Email string `json:"email"`
Active bool `json:"active"`
Score float64 `json:"score"`
}Rust output:
use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize)]
pub struct Model {
pub user: ModelUser,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct ModelUser {
pub id: i64,
pub name: String,
pub email: String,
pub active: bool,
pub score: f64,
}Run locally:
git clone https://github.com/Ghost-Sellz/JSONCraft
cd JSONCraft
open index.htmlNo npm install. No build step. Just open the file.
jsoncraft/
βββ index.html β UI and layout
βββ style.css β Theming, dark/light mode, responsive layout
βββ script.js β All conversion logic and feature handlers
- TypeScript interface generator
- Python dataclass generator
- GraphQL schema generator
- SQL table generator
- Go struct generator
- Rust struct generator
- Java class generator
- Kotlin data class generator
- Zod schema generator
- Prisma schema generator
- Drag & drop JSON files
- Import JSON from API URL
- Live conversion mode
- Monaco editor integration
- CLI version
- Zod refinements and validations
- Prisma relations from nested objects
- Export as multiple files (one per model)
Contributions are welcome! See CONTRIBUTING.md for full guidelines.
Quick start:
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Make your changes and test in the browser
- Submit a pull request
JSONCraft runs entirely client-side. Your JSON never leaves the browser. See SECURITY.md for the full policy.
Developers constantly convert JSON API responses into typed data models. It's repetitive, error-prone, and a waste of time. JSONCraft removes that entirely β paste JSON, pick a language, and get clean output in under a second.
If JSONCraft saved you time, consider giving it a β on GitHub.