Java Properties to JSON Converter
Paste a Java .properties file and this converter parses every key into a flat JSON object you can copy in one click. It handles both the equals and colon separators, skips hash and exclamation comments, decodes escapes such as \uXXXX, and joins backslash line continuations. Flip the Direction menu to turn a flat JSON object back into .properties text for a config file.
How to convert .properties to JSON
- Open the Direction menu and choose Properties to JSON (or JSON to Properties for the reverse).
- Paste your .properties text into the input box, or click Load sample to see the format.
- Read the converted JSON in the output box below, formatted with two-space indentation.
- If a red error appears, fix the input (for JSON to Properties it must be a single JSON object).
- Click Copy to put the result on your clipboard.
Examples
Dotted keys with both separators
db.host=localhost db.port:5432
{
"db.host": "localhost",
"db.port": "5432"
}Comment skipped and a \uXXXX escape decoded
# greeting greeting=caf\u00e9
{
"greeting": "cafΓ©"
}JSON back to properties lines
{ "db.host": "localhost", "db.port": "5432" }db.host=localhost db.port=5432
Frequently asked questions
Is my file uploaded anywhere?
No. The conversion runs entirely in your browser with client-side JavaScript, so your keys, secrets and values never leave your device or touch a server.
Which separators and comments are supported?
Both key=value and key:value are parsed, using the first unescaped = or : as the split point. Lines whose first character is # or ! are treated as comments and skipped, and blank lines are ignored.
Are line continuations handled?
Yes. A logical line that ends with an odd number of backslashes continues onto the next physical line. The trailing backslash is dropped and the leading whitespace of the continuation is stripped, so app.name=Boneyard \ then Tools becomes Boneyard Tools.
Are escapes like \n and \uXXXX decoded?
Yes. In values the sequences \n, \r, \t and \f become their control characters, \uXXXX becomes the matching Unicode character, and a backslash before any other character yields that character. Going the other way, those characters are re-escaped.
Are dotted keys turned into nested objects?
No. A key like db.host is kept flat and used verbatim as the JSON key. This is the safest round-trippable mapping, since nesting on every dot would break keys that legitimately contain dots.
What happens to a key with no value?
A line with a key but no = or : separator is kept and given an empty string value. So a bare line like debug becomes "debug": "" in the JSON.
How are duplicate keys handled?
The last occurrence wins. If the same key appears twice, the value from the final line overwrites the earlier one, which matches how java.util.Properties loads a file.
What does the JSON to Properties direction require?
It expects a single flat JSON object. Arrays or non-object values raise an error, and any object or array used as a value is JSON-encoded into the properties value string rather than expanded.
Is there a size limit?
There is no fixed limit. Because everything runs locally, the practical ceiling is your device memory, and even large config files convert almost instantly.
Learn more
- The Java .properties file format explained
How Java .properties files store key and value pairs, the separator and comment rules, escapes, and why converting to JSON keeps keys flat.
Related tools
JSON to CSV
Convert JSON to CSV online. Paste an array of objects and get clean, spreadsheet-ready CSV with the right headers. Runs in your browser.
JSON Formatter
Format, validate and minify JSON online. Pretty-print with custom indentation, sort keys and catch syntax errors. Runs in your browser.
JSON to XML
Convert JSON to XML online. Paste JSON and get clean, indented XML with a custom root element. Special characters are escaped. Runs in your browser.
Air Fryer Converter
Convert any conventional oven recipe to air fryer settings. Lower the temperature by 25 F and cut the cook time by about 20 percent automatically.
Baker's Percentage Calculator
Turn a bread formula into grams with baker's percentages. Flour is 100 percent, enter water, salt and yeast percents to get weights and hydration.
Baking Pan Converter
Swap one baking pan for another and scale the batter to fit. Compares pan areas for round, square and rectangular pans and gives a batter scale factor.