Free JSON to Java / TypeScript Entity Class

Paste a JSON object and auto-generate the matching Java POJO or TypeScript interface, with automatic type inference for nested objects and arrays.

Key Features

⚑

Instant Generation

Paste JSON to generate entity classes instantly β€” no manual writing.

🧠

Type Inference

Automatically infer String / int / boolean / array / nested class from values.

πŸ”„

Two Languages

Switch between Java POJO and TypeScript interface in one click.

πŸ”’

Local Generation

Code is generated locally in the browser and is never uploaded.

How to Use

1

Paste JSON

Paste the JSON data returned by an API into the input box.

2

Choose Language

Select whether to generate Java or TypeScript.

3

Copy Code

Copy the generated entity class into your project in one click.

Frequently Asked Questions

Does it support nested objects?

Yes. Nested objects auto-generate child classes/interfaces, and objects inside arrays get corresponding types too.

What if field names have underscores?

Field names are preserved as-is. For Java, use your IDE's Refactor to convert to camelCase; TypeScript works directly.

Will my JSON be sent to a server?

No. Code generation happens entirely in the browser.

How are empty arrays / empty objects handled?

Empty values cannot infer a type, so they generate an Object type β€” you need to change it to the actual type manually.