JSON to Java properties converter
Built for Java and Spring Boot developers moving settings from JSON into application.properties or message bundles.
Loading the tool…
Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.
How to use it
- Enter json text, list item style and escape non-ascii as \uxxxx.
- The result appears straight away and updates as you edit.
- Copy the result, or copy a link that keeps the same values to share it.
How it is calculated
Nested keys are joined with dots and list items with [0] brackets or .0. In keys, space, =, :, # and ! are escaped with a backslash; in values, \, line breaks (\n) and a leading space are escaped. Non-ASCII letters can be turned into \uXXXX for older systems that read ISO-8859-1.
Example
Inputs: List item style = Brackets list[0] (Spring), Escape non-ASCII as \uXXXX = no. Result: .properties: app=toolsahla version=2.1.0 port=8080 debug=false languages[0]=ar languages[1]=en database.host=localhost database.user=admin database.timeout=30 ; Keys: 9.
{
"app": "toolsahla",
"version": "2.1.0",
"port": 8080,
"debug": false,
"languages": ["ar", "en"],
"database": {
"host": "localhost",
"user": "admin",
"timeout": 30
}
}app=toolsahla version=2.1.0 port=8080 debug=false languages[0]=ar languages[1]=en database.host=localhost database.user=admin database.timeout=30
Limits and caveats
- Empty objects and lists are not written, since properties cannot represent them.
- Every value becomes text, and null is written as an empty value.
Questions about this tool
Do I need to escape Arabic as \uXXXX?
Since Java 9 resource bundles are read as UTF-8, so only older systems or ones reading ISO-8859-1 need it.
Which list style does Spring Boot read?
Spring Boot binds list[0] style keys to lists, which is the default here.
Why is there a backslash before a space in a key?
A space ends the key in a properties file, so it is escaped to stay part of the key.
