JSON to Properties Converter
Convert a JSON object to Java .properties format, with nested-object flattening and comment reinsertion. Client-side only.
Paste a JSON object and get a Java .properties file that java.util.Properties and Spring Boot can load. Nested objects become dotted keys such as server.port=8080, separators and line breaks are escaped with a backslash so values survive the round trip, and a $comments map is written back as # comment lines. Conversion runs in your browser; nothing is uploaded.
About the JSON to Properties Converter
A .properties file is line-based, so the serializer escapes anything that would change how Java splits a line: a space in a key becomes \ , an = or : inside a value becomes \= or \:, and a line break becomes \n. Keys and values are joined with =, and nested JSON objects are flattened into dotted keys in their original order. Non-ASCII text such as café is written as UTF-8 rather than \uXXXX escapes; Java 9 and later read resource bundles as UTF-8, but Properties.load(InputStream) decodes ISO-8859-1, so load the file through a UTF-8 Reader in your own code.
You May Also Need
How to convert JSON to .properties
- 1
Paste a JSON object
Enter an object in the input panel or load the { "server": { "port": 8080 } } sample with the flask icon; top-level keys become property names.
- 2
Set the key separator
Advanced options lets you keep the Java-style dot used by names like spring.datasource.url, pick another separator, or turn flattening off so nested objects stay as JSON text.
- 3
Click Convert
Every leaf becomes a key=value line, with spaces in keys, separators in values, and line breaks backslash-escaped so java.util.Properties reads the same values back.
- 4
Save it as .properties
Copy the output or download a .properties file for src/main/resources, and use the switch-direction icon to parse it back into JSON.
References
- Java SE — java.util.Properties
The official Java API documentation defining the .properties file format this converter's output targets.
- RFC 8259 — The JSON Data Interchange Format
The IETF specification for the JSON input format this tool parses.
Related developer tools
Properties to JSON
Convert a Java .properties file into JSON, with comments above each key kept in a $comments map.
JSON to Env
Convert a JSON object into .env format, the equivalent flow for environment-variable config files.
JSON Formatter
Paste raw JSON and instantly get a formatted, syntax-highlighted, validated view before converting it.
YAML to JSON
Convert between YAML and JSON configuration formats.
JSON to Properties FAQ
- Which characters are escaped?
- A space in a key, = and : inside values, and line breaks are written with a backslash—for example a\ b=x\=y and note=line1\nline2—which are exactly the escapes java.util.Properties decodes when it loads the file.
- Are non-ASCII characters written as \uXXXX escapes?
- No, they are written as plain UTF-8. Java 9 and later load .properties resource bundles as UTF-8, but java.util.Properties#load(InputStream) assumes ISO-8859-1, so read the file with load(Reader) and a UTF-8 reader if your code uses that API.
- Can I generate Spring Boot application.properties from JSON?
- Yes. Spring Boot uses dotted property names, so { "server": { "port": 8080 } } becomes server.port=8080 with the default dot separator.
- What happens to JSON arrays?
- An array is written as a single value containing its JSON text, such as hosts=["a","b"]. Spring Boot's indexed form (hosts[0]=a) is not generated.
- How are booleans and numbers written?
- As plain text—true, false, or the number—since .properties values are always strings. Properties to JSON turns them back into real JSON types when type inference is on.
- Does JSON to Properties write comments?
- Yes. Entries in a $comments object, such as the one Properties to JSON produces, are written as # lines above the matching key. Set Comments to "Ignore" to output key=value lines only.
- Is my JSON uploaded anywhere?
- No. All parsing and formatting happens locally in your browser, with no network requests involving your data.