📋 JSON to Java .properties Converter
Paste a JSON object and get a Java .properties file, with separators, spaces and special characters properly escaped.
flat keys → key=value lines
How the json to java .properties converter works
The tool parses your JSON object and writes one key=value line per property. In keys, the characters that would otherwise act as separators (=, :, space) plus # and ! are backslash-escaped; in values, backslashes and control characters (newline, tab, carriage return) are escaped so the file parses back cleanly. Numbers and booleans are written as text. The JSON must be a flat object at the top level, matching the flat namespace of a .properties file. Dotted keys are written verbatim, "server.port": 8080 becomes the line server.port=8080, because in .properties a dot is an ordinary character in the key name, not a nesting operator. A Windows path value like C:\logs is escaped to C:\\logs so Java reads a single backslash back.
This produces files for Spring Boot (application.properties), Java resource bundles and other JVM configuration. Keep your JSON flat and use dotted keys (server.port) the way Java apps expect. Because it can carry credentials and internal settings, the conversion runs entirely in your browser, nothing is uploaded, and you should store and version the output securely.
Frequently asked questions
How do I convert JSON to a .properties file?
Paste a flat JSON object or load a .json file and the tool outputs key=value lines. Copy the result or download it as a .properties file for your Java or Spring app.
How are special characters escaped?
In keys, the separators =, : and space plus # and ! are backslash-escaped so they're read as part of the key. In values, backslashes and newlines/tabs are escaped. This keeps the file valid and lossless when Java reads it back.
Should I use dotted keys?
Yes, Java configuration conventionally uses dotted keys like server.port or spring.datasource.url. Put those dotted names directly in your JSON and they're written verbatim as property keys.
What about nested objects?
A .properties file is flat, so keep the JSON one level deep. A nested object is serialized to a JSON string as its value; if you want dotted keys, flatten the structure in your data first.
Why is my backslash doubled in the output?
A single backslash is the escape character in .properties, so a literal backslash must be written as \\. A path such as C:\logs is emitted as C:\\logs; when Java loads the file it un-escapes it back to the single-backslash path you intended.
Which separator does it use, = or : ?
The tool writes the equals sign (key=value), the most common form. Java accepts =, : or whitespace as the separator when reading, so the file loads fine either way; if a colon appears inside a key it is escaped so it is not mistaken for the separator.
Is my JSON uploaded?
No, the conversion runs locally in your browser and nothing is transmitted, so configuration and any secrets stay on your device.