Running on your device · 0 bytes uploaded

Generate code from JSON

Turn JSON into TypeScript, Go, Rust, or Zod — generated in your browser from one sample, with every option and the exact generator version shown. The output is a starting point, not a contract.

JSON in
Paste JSON
TypeScript out
Generated TypeScript appears here
Nothing in yet

Paste, drop, or type to begin. Everything stays on this device.

How JSON becomes TypeScript

TypeScript mapping rules

  • Objects become interfaces in first-seen order; properties are required unless the nullability option makes them optional.
  • JSON null infers the literal type null — a nullable property is a union, not an optional marker.
  • Arrays always keep their order as array types; nested objects become their own named interfaces.

Inference rules (every language)

  • quicktype-core infers one schema from ONE sample: every property it sees becomes required — absence in the sample is absence in the types.
  • Inference defaults: similar objects combine into one class; UUID-like, date-time-like, integer-like, and boolean-like strings become their typed forms; heterogeneous maps infer as maps.
  • Number kinds are inferred through IEEE-754 doubles: spellings like 1e400 or 30-digit integers still infer, but as doubles when they exceed the target's integer range.
  • The output is a starting point: names are guesses (Top-level, and per-shape names), and review beats trust.

Letters, digits, underscores — starts with a letter or underscore.