TypeScript to JSON Converter
Generate valid JSON mock data derived directly from your TypeScript interfaces. Great for seeding databases or testing UI components.
๐ TypeScript Interface
๐ JSON Mock Output
Instant Mock Data from TypeScript
Developers often define their data structures in TypeScript interfaces first, then need "dummy data" to test their UI. Instead of writing JSON manually, our **TypeScript to JSON Converter** parses your `interface` or `type` definitions and auto-generates realistic JSON objects to match.
๐ Smart Defaults
We populate fields based on their type. `string` gets "text", `number` gets 123, `boolean` gets true.
๐งฉ Array Support
Detects `string[]` or `MyType[]` and generates arrays with sample items automatically.
Frequently Asked Questions
Does it support complex unions?
Currently, it supports basic primitive types and arrays. For complex unions like `string | number`, it will typically default to the first type found.
Can I use this for testing?
Absolutely. This is the primary use caseโgenerating quick fixtures for Jest tests or Storybook stories.