If this tool helped you, you can buy us a coffee ☕
Convert JSON strings into Elixir structs or Map code. Ideal for API data processing and data modeling.

JSON to XML & XML to JSON Converter
A two-way conversion tool for JSON and XML data structures, designed for development, testing, and data processing.

JSON to YAML & YAML to JSON Converter
Bidirectionally convert between JSON and YAML structured data formats, with support for custom output styling.

JSON to CSV & CSV to JSON Converter
Convert seamlessly between JSON arrays and CSV tabular data. Ideal for data analysis and software development.

JSON to C# Class Converter
Automatically convert JSON data into C# class definitions, ideal for .NET developers building data models.

JSON to XML & XML to JSON Converter
A two-way conversion tool for JSON and XML data structures, designed for development, testing, and data processing.

JSON to YAML & YAML to JSON Converter
Bidirectionally convert between JSON and YAML structured data formats, with support for custom output styling.

JSON to CSV & CSV to JSON Converter
Convert seamlessly between JSON arrays and CSV tabular data. Ideal for data analysis and software development.

JSON to C# Class Converter
Automatically convert JSON data into C# class definitions, ideal for .NET developers building data models.

JSON to Java POJO Generator
Automatically convert JSON strings into standard Java POJO class code for API integration, data modeling, and other development scenarios.
Manually writing Elixir struct definitions is tedious and prone to errors. This tool directly parses standard JSON strings and automatically generates the corresponding Elixir structs (defstruct) or Map literal code. JSON is a lightweight data-interchange format, while Elixir structs are strongly typed data structures with predefined fields. This tool maps JSON key-value pairs to Elixir atom keys and typed values, intelligently recognizing nested objects, arrays, and primitive types.
How are JSON keys mapped to Elixir fields?
The tool directly converts JSON keys into Elixir atoms (e.g., "userName" becomes :user_name). Note that special characters may require manual adjustment.
How large of a JSON payload can it handle?
We recommend processing data under 1MB. Extremely large JSON files may be limited by your browser's memory.
Please ensure your input is valid JSON. Special formats like dates will be converted to strings and require further processing. You will need to rename the generated struct according to your project's naming conventions. For sensitive data, we recommend offline use.
For API data modeling, we recommend using this tool to generate the base struct framework, then manually adding type specs and default values. Example: Inputting {"name":"Lee","age":28} outputs %User{name: "Lee", age: 28}. When decoding with the Jason library, structs provide the added benefit of compile-time checks.