.properties to JSON
Parse a Java .properties file into JSON. Both = and : separators are accepted, \uXXXX escapes are decoded, backslash line-continuations are joined, and dotted keys are rebuilt into nested objects.
How to convert a .properties file to JSON
- Paste the contents of your
.propertiesfile, or drop the file in. - Leave nesting on to turn
app.portinto{"app": {"port": …}}, or tick Keep flat dotted keys to preserve the literal key names. - Choose whether values are type-inferred or kept as strings.
- Copy or download the JSON.
Format details handled
- Comments — lines beginning with
#or!. - Separators —
=,:, or just whitespace, all per thejava.util.Propertiesspec. - Escaped separators in keys —
a\=b=valuegives the keya=b. - Line continuations — a line ending in a single backslash continues on the next line, with leading whitespace stripped.
- Unicode escapes —
\u00e9becomesé. - Indexed keys —
servers[0].hostrebuilds into an array of objects.
Privacy
Nothing is uploaded. The conversion runs in this tab using your own browser's JavaScript engine — no server sees your data, and the page keeps working with the network disconnected.
FAQ
Why did two keys merge into one object?
Because nesting is on and they share a prefix — a.b and a.c both become children of a. If a key genuinely contains a dot, tick Keep flat dotted keys.
What if a key is both a value and a parent?
For example a=1 together with a.b=2. The later key wins and replaces the earlier scalar, because JSON cannot hold both at one path. Use flat mode to keep both.
Does it read .properties inside a JAR?
No — paste the text. Nothing is uploaded, and the tool has no filesystem access beyond the file you drop on it.