JSON To Java Online

Class name: Package Name:

JSON to JAVA Converter Online

JSON to Java Class Converter is easy to use tool to convert JSON to Java Class. Copy, Paste and Convert.

It offer tools for:

  1. Generate Java entity class from JSON string online.
  2. Generate JavaBean from JSON string online.
  3. Generate Java POJO object from JSON string online.

How to use JSON To Java Online?

  1. In the above textarea field write or paste your json string.
  2. Click 'JSON to Java' button to generate your java entity class code.
  3. Click 'Copy' button to paste it into your clipboard, you can also download the result file.

Tips: you can customer the java class name and package name .

JSON to Java Class Example

Input json string:

{
  "id":1,
  "name":"John",
  "age":24
}
Output java class result:
package com.online.compiler.json2bean;

/**
 * Auto-generated: 2024-08-09 15:9:0
 *
 * @author www.online-compiler.com 
 * @website http://www.online-compiler.com/json/json2java/ 
 */
public class OnlineCompiler {

    private int id;
    private String name;
    private int age;
    public void setId(int id) {
         this.id = id;
     }
     public int getId() {
         return id;
     }

    public void setName(String name) {
         this.name = name;
     }
     public String getName() {
         return name;
     }

    public void setAge(int age) {
         this.age = age;
     }
     public int getAge() {
         return age;
     }

}