What are .properties and JSON?
A .properties file is the Java configuration format: key=value lines whose dotted keys (spring.datasource.url) imply a hierarchy, with \uXXXX escapes for non-ASCII text. JSON is the text format of web APIs: objects in braces, lists in brackets, strings always in double quotes, and nothing else.
Useful to inspect a Java configuration as a tree, to feed it to a JavaScript tool, or to turn a Java i18n bundle into the JSON that front-end libraries read.
This page opens the data converter already set to .properties → JSON. Paste the text, read the result as you type, then copy it or download it as a file. Errors show the line and the column. Nothing is sent anywhere: the conversion runs in your browser.
.properties vs JSON
| .properties | JSON | |
|---|---|---|
| Extension | .properties | .json |
| Media type | text/x-java-properties | application/json |
| Comments | yes (# or !) | no |
| Data types | text only | string, number, true/false, null, object, array |
| Nesting | implied by dotted keys and [0] | any depth |
| Typical use | Spring Boot, Java apps, i18n bundles | APIs, package.json, logs |
| Specification | java.util.Properties | RFC 8259 |
When to convert .properties to JSON
- Convert to JSON when another program or an API will read the data.
- Keep .properties when a Spring Boot or Java app reads its settings from it.
What changes in the conversion
- Comments of the .properties file are not carried over: the converter reads the data, and comments are not data.
- Dotted keys become nested objects and
[0]becomes a list; every value is text, because.propertieshas no types.
How to convert .properties to JSON
- Paste your .properties in the input box (the page opens with an example you can replace).
- Read the JSON on the right; it updates as you type. If something is wrong, the message says the line and column.
- Adjust the options if you need: indentation, sorted keys or type detection.
- Copy the result or download it as a
.jsonfile.
Example
This .properties input:
# orders service
spring.application.name=orders
server.port=8080
spring.datasource.url=jdbc:postgresql://db:5432/orders
spring.datasource.hikari.maximum-pool-size=10
app.features[0]=pix
app.features[1]=boletobecomes this JSON, exactly as the converter writes it:
{
"spring": {
"application": {
"name": "orders"
},
"datasource": {
"url": "jdbc:postgresql://db:5432/orders",
"hikari": {
"maximum-pool-size": "10"
}
}
},
"server": {
"port": "8080"
},
"app": {
"features": [
"pix",
"boleto"
]
}
}Frequently asked questions
Is my .properties sent to a server?
No. Conversion happens in your browser, so secrets in a config never leave your computer.
Does .properties to JSON keep comments?
No. Comments are dropped because the converter works on the data itself. Copy important comments by hand; JSON itself has no comment syntax.
What happens to nested data?
.properties nesting: implied by dotted keys and [0]. JSON nesting: any depth. The structure is kept as it is.