JSON to Properties Converter
Flatten JSON configuration into escaped Java properties entries.
Flatten JSON into Java properties
Java properties files store a flat set of keys, while JSON can contain arbitrarily nested objects and arrays. This converter parses the JSON structure and walks each path into a dotted property key. Array indexes become numeric path segments, and keys escape spaces, separators, comment markers, and backslashes according to properties syntax.
The default sample produces db.host=localhost, tags.0=a, and tags.1=b. Newlines, tabs, carriage returns, and backslashes inside values are escaped instead of creating accidental extra entries. Empty containers receive an empty value so their path remains visible rather than vanishing from the result.
Escapes, arrays, and recovered types
A properties file does not retain native JSON scalar types, so numbers, booleans, and null are written as text. Dotted keys are a reversible convention used by this paired converter, but a target framework may assign different meaning to dots or numeric segments. Conversion happens in your browser. Review naming and type coercion rules for the Java library that will load the file.
Frequently Asked Questions
How are JSON arrays represented?
Each array item receives a numeric dotted path segment, such as tags.0 and tags.1.
Are properties separators and comment characters escaped?
Yes. Keys escape spaces, colons, equals signs, comment markers, and backslashes.
Will numbers remain numeric in a properties file?
No. Java properties values are text, so the consuming application decides how to coerce each value.
Browse the full set of free, private, in-browser tools.