Inference rulesNested objects split into separate types; arrays are typed automatically; optional/nullable fields detected; mixed types form unions; null / empty arrays fall back to sane types; identical shapes are deduped and name clashes disambiguated.Runs locally — no fixed size limit (bounded by browser memory)
Sample JSONJSON
Paste or type JSON
GeneratedScala
Paste or type JSON
JSON → case class · Local · No upload

JSON to Scala Case Class Generator

Sample JSON → case class · Option · List · Keyword escaping

🔒Processed locally in your browser — never uploaded or stored

No upload, no storage

JSON is processed in memory and never sent to a server.

Share via URL fragment

Share links encode data in the # anchor — never sent to a server.

Remember last edit

Optionally keep your last input locally; clear it with one click.

Generate Case Classes from JSON|Option for Optional Fields|Keyword Escaping|Ready for circe & play-json|Runs Locally

Generate Case Classes

Nested objects split into separate case classes, ready for circe or play-json to derive codecs from.

Option for Optional Fields

Missing and nullable fields are wrapped in Option — no null slipping through.

Keywords Backticked

Keys that collide with Scala keywords like type or val are wrapped in backticks and still compile.

Original Key Kept in a Comment

When a camelCased field drifts from the original key, the JSON name is noted at the end of the line so the mapping isn't lost.

Runs Locally — No Upload

Generation runs in your browser; data is never uploaded.