Properties to JSON Converter
Convert a Java .properties file to JSON and JSON back to .properties, right in your browser. Your config never leaves your device.
Java Properties ↔ JSON runs entirely in your browser. The .properties files and JSON you paste never leave your device and nothing is uploaded to ArrayKit.
Open the dotenv to JSON Converter
About Java Properties ↔ JSON
Java Properties ↔ JSON reads a Java .properties file — the key=value config format used by Spring, Maven, and countless JVM apps — and turns it into a clean JSON object you can drop into a modern config pipeline. It skips blank lines and '#' or '!' comments, joins backslash line continuations, and decodes \uXXXX and \n \t \\ escapes inside values. Turn on 'Expand dotted keys' and dotted keys like db.host automatically nest into a db: { host } object; turn it off to keep dotted keys flat. Flip the direction to go the other way and a JSON object becomes valid .properties text, with nested objects flattened back into dotted keys and special characters escaped. It is built for Java and Spring developers migrating config between legacy properties files and JSON-based tooling. Everything runs locally — your configuration never leaves the browser.
Features
- Convert a Java .properties file into a JSON object in one paste
- Turn a JSON object back into valid .properties text
- Expand dotted keys like db.host into nested JSON objects
- Toggle nesting off to keep dotted keys flat instead
- Skips blank lines and '#' or '!' comment lines
- Joins backslash line continuations across multiple lines
- Decodes \uXXXX unicode escapes and \n \t \\ in values
- Runs entirely in your browser with no config uploaded
How to use the Java Properties ↔ JSON
- Keep 'Properties → JSON' selected and paste your .properties file
- Toggle 'Expand dotted keys (nested)' on or off as needed
- Copy the JSON output or download it as config.json
- Switch to 'JSON → Properties' to reverse the conversion
Example
Input
db.host=localhost
db.port=5432
Output
{
"db": {
"host": "localhost",
"port": "5432"
}
}
Dotted keys like db.host expand into a nested db object when nesting is on.
Common errors & troubleshooting
- Dotted keys like db.host stay flat instead of nesting in the JSON. — Turn on 'Expand dotted keys (nested)' so keys split on '.' become nested objects, or leave it off if you want a single flat key per line.
- 'JSON → Properties' reports the JSON must be an object. — A .properties file is a set of key/value pairs, so the input must be a single JSON object at the top level, not an array or a bare string or number.
- A multi-line value in the .properties file gets cut off. — End the first line with a single unescaped backslash so the converter joins it with the next line into one logical value, matching how Java's Properties.load reads it.
- Accented or non-Latin characters look wrong after converting. — Properties files traditionally use \uXXXX escapes for non-ASCII text. The converter decodes those automatically, so paste the raw escaped .properties text rather than a pre-decoded copy.
Frequently asked questions
- What does the Java Properties ↔ JSON converter do with dotted keys?
- With 'Expand dotted keys (nested)' on, a key like db.host=localhost becomes { "db": { "host": "localhost" } }. Turn the toggle off to keep the literal key "db.host" as a single flat property instead.
- Does the Properties to JSON converter support \uXXXX unicode escapes?
- Yes. Values containing \uXXXX sequences (the standard way Java's Properties format encodes non-ASCII text) are decoded to the actual character, along with \n, \t, and \\ escapes.
- Can I use ':' or whitespace instead of '=' in my .properties file?
- Yes. The parser accepts key=value, key:value, and key value (separated by whitespace), matching how Java's Properties.load() reads all three separator styles.
- How does JSON to Properties handle nested JSON objects?
- Nested objects are flattened into dotted keys, so { "db": { "host": "x" } } becomes db.host=x. Arrays and other non-object values are converted to their string representation.
- Does this tool ignore comments in a .properties file?
- Yes. Lines starting with '#' or '!' are treated as comments and skipped, matching the two comment markers Java's Properties format recognizes.
- Is my .properties file or JSON config uploaded anywhere?
- No. Java Properties ↔ JSON runs entirely in your browser. The .properties text and JSON you paste never leave your device and are not sent to ArrayKit or any server.
Related tools
- dotenv to JSON — Convert a .env file to JSON and JSON back to .env, with quoting and comments handled.
- INI to JSON — Convert INI config files to JSON and JSON back to INI, with sections and comments.
- YAML ↔ JSON — Convert YAML to JSON and back.
- TOML Formatter & Converter — Format and validate TOML, and convert TOML ↔ JSON.
- JSON Formatter — Beautify, minify and validate JSON with error locations.
- CSV to JSON — Convert CSV or TSV to JSON with type inference and nested keys, in your browser.
All ArrayKit tools