LazyTools

🔒 Every tool runs in your browser — the files and values you enter are never uploaded to any server. How it works

☕ Java .properties to JSON Converter

Paste a Java .properties file and get a flat JSON object, with continuations, escapes and : separators handled correctly.

5 properties

Rate this tool:
Anonymous — no account, no identifier

How the java .properties to json converter works

Java .properties files use their own rules, and the converter follows them: a key and value are separated by the first unescaped =, : or whitespace; lines starting with # or ! are comments; a line ending in a backslash continues onto the next (whose leading whitespace is stripped); \uXXXX escapes decode to Unicode characters; and \=, \:, \ , \t, \n and \\ are unescaped. Keys often contain dots (server.port) — these are kept literally as flat keys, not expanded into nested objects, so the mapping is unambiguous and reversible.

This is the format behind Spring Boot application.properties, Java i18n resource bundles and many JVM tools, and converting it to JSON makes it easy to inspect or feed into JavaScript tooling. Dotted keys stay flat by design — turning server.port into { server: { port } } would be a guess that breaks round-tripping. Everything is parsed in your browser, so configuration (which may include credentials or internal hostnames) never leaves your device.

Frequently asked questions

How do I convert a .properties file to JSON?

Paste the file or load a .properties file and the tool outputs a flat JSON object, with each property becoming a key. Copy or download the JSON.

Does it handle : separators and line continuations?

Yes. Keys and values can be separated by =, : or whitespace (whichever unescaped character comes first), and a line ending in a single backslash continues onto the next line with its leading whitespace trimmed — exactly as the Java properties spec defines.

What about \uXXXX and escaped characters?

Unicode escapes like \u00e9 are decoded to their character (é), and escaped separators (\=, \:, \ ) plus \t, \n, \r and \\ are unescaped, so the JSON holds the real intended text.

Why are dotted keys like server.port not nested?

The dot is just part of the key name in .properties; there's no rule that it implies nesting. Keeping keys flat ("server.port": "8080") is unambiguous and lets you convert back to an identical file. Expand them in your code if you want a tree.

Is my file uploaded?

No — parsing runs locally in your browser and works offline, so property values stay on your device.

Related file converters

From the blog