Skip to content

JSON to OCaml

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

Input

json
loading editor…

Paste your JSON here...
or drop a file anywhere in this pane

Output

ocaml

OCaml types will appear here...
press to generate ocaml

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