Convert Spring Boot application.properties to JSON

Transform a Spring Boot application.properties file into a nested JSON structure with database, JPA, and logging configuration.

Spring Boot

Detailed Explanation

Spring Boot application.properties

Spring Boot is the most popular Java framework, and application.properties is its primary configuration file. Properties use dot-notation to organize settings into logical groups: server.*, spring.datasource.*, spring.jpa.*, and logging.*.

Example Properties

server.port=8080
server.servlet.context-path=/api
spring.datasource.url=jdbc:postgresql://localhost:5432/mydb
spring.datasource.username=admin
spring.datasource.password=secret123
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
logging.level.root=INFO
logging.level.com.example=DEBUG

Nested JSON Output

When converted with dot-notation expansion enabled, these flat keys become a deeply nested JSON object:

{
  "server": {
    "port": 8080,
    "servlet": {
      "contextPath": "/api"
    }
  },
  "spring": {
    "datasource": {
      "url": "jdbc:postgresql://localhost:5432/mydb",
      "username": "admin",
      "password": "secret123"
    },
    "jpa": {
      "hibernate": {
        "ddlAuto": "update"
      },
      "showSql": true
    }
  }
}

Key Behaviors

  • Numeric values like 8080 are automatically typed as JSON numbers
  • Boolean values like true become JSON booleans
  • Dot-separated keys are split and nested into objects
  • The hyphen-to-camelCase mapping (context-path to contextPath) preserves the original key as-is; the tool does not rename keys

This nested structure is useful when migrating Spring Boot configuration to YAML format or when integrating with JSON-based configuration management tools like HashiCorp Consul or Spring Cloud Config.

Use Case

Converting Spring Boot application.properties to JSON for use with Spring Cloud Config Server, migrating to YAML format, or importing into JSON-based configuration management systems like Consul or etcd.

Try It — Properties \u2194 JSON Converter

Open full tool