What is JSON to F# Record Generator?
This tool converts JSON data into F# record type definitions. It automatically infers F# types from JSON values, generates PascalCase field names, and creates properly structured record types with nested type support.
How to Use
- Paste your JSON data into the input area
- Click "Generate" to convert JSON to F# record types
- Copy the output and paste it into your F# project
Why Use This Tool?
Tips & Best Practices
- Use realistic sample data — type inference depends on actual values
- Nested objects become separate record types with PascalCase names
- Null values are typed as 'a option for flexibility
- Empty arrays are typed as 'a list
Frequently Asked Questions
How are JSON types mapped to F#?
JSON strings → string, integers → int, floats → float, booleans → bool, null → 'a option, arrays → T list, objects → separate nested record types.
What is a record type in F#?
A record is a simple aggregate of named values, optionally including members. Records are reference types and provide structural equality by default, making them ideal for representing data.
How are nested objects handled?
Nested JSON objects are converted to separate F# record types. They are ordered children-first so that referenced types are defined before the types that use them.
Why are field names in PascalCase?
F# naming conventions use PascalCase for type names, public values, and record fields. This tool follows the standard F# style guide.
Is my data sent to a server?
No, all processing happens entirely in your browser. Your JSON data never leaves your device.