JSON to Properties
This JSON to Properties converter flattens nested JSON into dotted-path key-value config (app.name=xxx), escaping values automatically and preserving non-ASCII text as UTF-8. The path delimiter can switch between a dot, colon or slash. It is commonly used for Java i18n resource files and config migration, and everything runs locally in your browser.
How to use it
- 1
Paste object-form JSON
The Properties root must be an object; nested objects are flattened into path-style keys.
- 2
Choose the path delimiter
A dot is the default (app.name), but you can switch to colon, slash or hyphen to match a project convention.
- 3
Copy the .properties text
Keys are emitted in stable alphabetical order for easy diffing; save the result as a .properties file.
- 4
Validate in your build
Confirm your toolchain reads the file with the expected encoding and keys.
Key features
Nested paths flattened
{"server":{"port":8080}} becomes server.port=8080, making the hierarchy clear.
Reversible key escaping
Keys that themselves contain a dot or backslash are escaped (a\.b) and restored exactly on the way back, so levels are not split incorrectly.
Complete lexical escaping
Special characters in values such as spaces, =, :, newlines and tabs are escaped to the java.util.Properties rules.
Stable ordered output
Keys are sorted alphabetically so version control diffs stay clean, and array values are stored as JSON text without data loss.
UTF-8 friendly
Non-ASCII text is written directly as UTF-8, which Java 9 and later reads natively.
Local and private
Conversion runs in your browser and the data is not uploaded.
Common errors & troubleshooting
- ! A Properties root must be a key-value object, so wrap an array root in an object (such as { items: [...] }).
- ! Properties has no array type: array fields are stored as JSON text and remain arrays when converted back.
- ! A null value is emitted as a "key=" empty value, matching the Java Properties convention.
- ! Pick a delimiter that does not already appear in your key names to keep the mapping unambiguous.
Frequently asked questions
How is a nested JSON object represented?
It is flattened with dotted paths: {app:{name:"x"}} becomes app.name=x. The delimiter can be switched, and a key that contains a dot is escaped with a backslash so the structure stays exact when converted back.
Does non-ASCII text need \uXXXX escaping?
No. The tool writes UTF-8 directly, and Java 9 and later Properties reads UTF-8 natively. If your toolchain forces ISO-8859-1, post-process with native2ascii or an IDE encoding conversion.
Can Properties and JSON be fully interconverted?
Scalars and nested objects are reversible; Properties only has strings and empty values, so types are inferred on the way back and arrays are carried as JSON text. It is best used for config and i18n, not for complex tabular data.
Is my data uploaded?
No. Conversion happens locally in your browser.
Related tools
Properties to JSON
Convert Java .properties / i18n resource files into nested JSON. Line continuations, # and ! comments, \uXXXX escapes and = / : / whitespace separators are all supported. Runs locally.
JSON to YAML
Convert JSON to YAML while keeping the original structure, in a format that is easier to read and comment. Conversion errors point to the source position.
JSON Formatter
Format, beautify and validate JSON in your browser. Errors point to the exact line and column, and you can indent with 2 spaces, 4 spaces or a tab.
YAML to JSON
Convert YAML to JSON online. Anchors, merge keys and flow syntax are expanded and parsed under the YAML 1.2 core schema, avoiding implicit-type traps such as yes/no and dates. Runs locally.