Everyday tools ↗

Data & lists / FREE BROWSER TOOL

JSON to TypeScript types.

Infer a reviewable TypeScript type from JSON samples, including nested arrays, optional object properties and null unions.

YOUR EVERYDAY DESKKeep your
next task close.
Switch between tools ↗
JSON to TypeScript types
See result ↓● Live result
01 / YOUR INPUTS

Processed on this device.

02 / YOUR RESULT

Your answer

ON YOUR DEVICE

Your result will appear here.

Adjust a field to calculate.

LOCAL INPUTS / CLEAR WORKING / USEFUL OUTPUTNothing to sign in to.

Built and maintained by Operance Labs · Report a calculation or documentation issue

A LITTLE KNOW-HOW

How to use
this tool.

  1. Paste the sample data or replace it with your own local content.
  2. Choose the comparison, formatting or grouping options that match your task.
  3. Inspect the result, then copy it or create a local download.

What the inputs mean

JSON sample
Enter json sample.
Exported type name
Enter exported type name.
Keep exact string values as literal unions
Turn this option on or off to match your task.
A WORKED STARTING POINT

See the working.

Objects with and without featured infer an optional property; the example price accepts number or null.

Generated types describe the supplied samples and do not validate runtime input.

Your inputs stay here

Your input is processed on this device. PixelDesk does not upload it to a calculation or file-processing server. Copying and downloading are deliberate actions. Closing the page clears the in-memory inputs; the app remembers only its theme and public reference-rate cache.

Methods and public data ↗

Keep a useful
thing close.

All data & lists ↗

Questions, answered.

What can I do with json to typescript types?

Infer a reviewable TypeScript type from JSON samples, including nested arrays, optional object properties and null unions.

What does the json to typescript types example show?

Objects with and without featured infer an optional property; the example price accepts number or null.

What should I check before using the result?

Generated types describe the supplied samples and do not validate runtime input.