📋 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.
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.
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.