Properties to JSON
Convert a Java .properties file to nested JSON. Escapes, continuations and both separators are read correctly.
What Properties to JSON does
The file is read by the format's rules, not by splitting on =: the first unescaped =, : or space ends the key, so db.port: 5432 is one pair and db.url = jdbc:postgresql://… keeps its colon; a line ending in a backslash continues, and \u00e9, \:, \= and \n are unescaped. Dotted keys become nesting, so db.pool.max = 10 is {"db": {"pool": {"max": "10"}}}. A key that is both a value and a group — a = 1 beside a.b = 2 — is refused by name, because a JSON object cannot hold both.
How to use it
Properties to JSON: paste the .properties into the box above, and press Run to get the JSON below.
Worked example
Input:
# Application settings
server.port = 8080
server.host = 0.0.0.0
db.url = jdbc:postgresql://localhost:5432/app
db.pool.max = 10
Output:
{
"server": {
"port": "8080",
"host": "0.0.0.0"
},
"db": {
"url": "jdbc:postgresql://localhost:5432/app",
"pool": {
"max": "10"
}
}
}
Why it runs in your browser
The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads .properties and returns JSON; reloading the page discards both.
The file is read by the format's rules, not by splitting on `=`: the first unescaped `=`, `:` or space ends the key, so `db.port: 5432` is one pair and `db.url = jdbc:postgresql://…` keeps its colon; a line ending in a backslash continues, and `\u00e9`, `\:`, `\=` and `\n` are unescaped. Dotted keys become nesting, so `db.pool.max = 10` is `{"db": {"pool": {"max": "10"}}}`. A key that is both a value and a group — `a = 1` beside `a.b = 2` — is refused by name, because a JSON object cannot hold both.
Convert a Java .properties file to nested JSON. Escapes, continuations and both separators are read correctly.
How to use it
Properties to JSON: paste the .properties into the box above, and press Run to get the JSON below.
Why it runs in your browser
The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads .properties and returns JSON; reloading the page discards both.
What to Expect
Best for
- Converting .properties to JSON when the data is already on screen.
What this tool keeps
- Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere.
Sample input
# Application settings server.port = 8080 server.host = 0.0.0.0 db.url = jdbc:postgresql://localhost:5432/app db.pool.max = 10
Sample output
{ "server": { "port": "8080", "host": "0.0.0.0" }, "db": { "url": "jdbc:postgresql://localhost:5432/app", "pool": { "max": "10" } } }
Frequently asked questions
How do I use the properties to json?
Properties to JSON: paste the .properties into the box above, and press Run to get the JSON below.
Is my input uploaded?
No. The text is parsed on this page with JavaScript and is never posted to a server.
Is there a size limit?
Yes: 5 MB per run. Larger input is refused with a message rather than freezing the tab.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.