JSON to .properties
Convert JSON into a Java .properties file. Nested objects become dotted keys, non-ASCII characters are escaped as \uXXXX for the ISO-8859-1 encoding the format assumes, and arrays can be indexed the way Spring Boot's relaxed binding expects.
How to convert JSON to a Java .properties file
- Paste your JSON configuration.
- Pick the Separator. All three forms are valid per the
java.util.Propertiesspec. - Tick Index arrays for
servers[0].hoststyle keys — that is what Spring Boot binds to aList. Leave it off to comma-join arrays instead. - Leave Unicode escaping on unless you know your file will be read as UTF-8 —
Properties.load(InputStream)assumes ISO-8859-1. - Copy or download the file.
Escaping rules
The properties format reserves several characters, and this tool escapes them all:
- In keys —
=,:and spaces are backslash-escaped, since any of them would otherwise end the key. - In both — backslashes are doubled; tabs, newlines and carriage returns become
\t,\n,\r. - Non-ASCII — escaped as
\uXXXXby default. This is not optional for files loaded through the classic byte-stream API: anything above code point 126 is misread as ISO-8859-1 otherwise.
Spring Boot specifics
Spring Boot's relaxed binding accepts app.name, app-name and
APP_NAME as the same property, so the dotted output here works directly. For lists it wants
indexed keys — turn on Index arrays. If you would rather use YAML,
JSON → YAML produces application.yml instead.
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
Do modern Java versions still need \uXXXX escapes?
It depends on how the file is loaded. Properties.load(Reader) respects the reader's charset, so UTF-8 works. Properties.load(InputStream) — still very common — assumes ISO-8859-1. Escaping is the safe default because it is correct either way.
What happens to null?
It becomes an empty value. The properties format has no null; an empty string is the closest equivalent, and most readers return "".
Can I go back?
Yes — .properties → JSON reverses it, un-escaping Unicode and rebuilding nesting from the dots.