PureDevTools

JSON to Scala Case Class Converter

Paste JSON, get Scala case classes — Option types, nested objects, arrays — copy or download as .scala

All processing happens in your browser. No data is sent to any server.

Options

Output: 316 charsClasses: 3

You’re integrating a REST API in Scala and need case classes that match the JSON response. The response has nested objects, arrays, and nullable fields. Writing case classes by hand means mapping every field, deciding between Option[T] and required fields, and writing codec derivations — tedious for large payloads.

What This Tool Does

Paste JSON and get Scala case classes instantly. Each nested object becomes its own case class. Nullable fields use Option[T]. Array elements are merged into a single case class with consistent field types.

Everything runs in your browser. Your data never leaves your device.

Type Mapping

JSON typeScala type
"hello"String
42Int
3.14Double
trueBoolean
nullOption[Any]
[{...}]List[ClassName]
{...}case class

When to Use This

FAQ

Does this send my data to a server?

No. All processing runs entirely in your browser.

How are nested objects handled?

Each nested JSON object becomes its own named case class. Names are derived from the parent class name plus the field key in PascalCase.

Related Tools

More JSON Tools