JSON to OCaml

Generate OCaml type definitions with Yojson PPX deriving from your JSON data samples.

OCaml types will appear here...

What Is This Tool?

Generate OCaml type definitions with Yojson PPX deriving from your JSON data. Each JSON object becomes an OCaml record type with proper type annotations.

How to Use

  1. Paste your JSON data into the input editor.
  2. Click "Generate OCaml" to create type definitions.
  3. Copy the OCaml code into your project.

Related Tools