---
title: "Properties JSON Converter"
description: "Convert Java .properties to nested or flat JSON, or flatten JSON back to dotted keys, in your browser. Continuations, \uXXXX escapes, and # or ! comments handled."
url: https://findutils.com/developers/properties-json-converter/
category: developers
---

# Properties JSON Converter

Convert Java .properties to nested or flat JSON, or flatten JSON back to dotted keys, in your browser. Continuations, \uXXXX escapes, and # or ! comments handled.

**Use this tool:** [Properties JSON Converter](https://findutils.com/developers/properties-json-converter/)

## Programmatic access

- Browser-only: this tool works on a file, the DOM, or a browser API and has no REST or MCP id.

## Why convert .properties to JSON in the browser?

Spring Boot, Gradle, Log4j and a long tail of Java tools keep configuration in .properties files: one dotted key per line, with continuation lines, backslash escapes and two comment characters. Reviewing a migration, feeding a config to a tool that only reads JSON, or checking what a hundred dotted keys actually describe is easier as a nested object. This page reads the file the way java.util.Properties does and writes JSON, nested by default or flat on request, in the tab. The reverse direction flattens a JSON object back into dotted keys and writes non-ASCII text as \uXXXX so an ISO-8859-1 loader reads it correctly.

## Frequently Asked Questions

### What does Nested mode do with app.db.host?

It expands the dotted key into nested objects: {"app":{"db":{"host":"..."}}}. Keys with [0], [1] suffixes become arrays. Flat mode keeps app.db.host as a single JSON key.

### Why are numbers quoted in the JSON?

Because Properties.getProperty returns a string, so server.port=8080 is "8080" to the program. Turn on Numbers and booleans to promote clean integers, decimals, true and false. Values with leading zeros stay strings.

### Does it handle continuation lines and escapes?

Yes. A line ending in a single backslash continues onto the next line with that line's leading whitespace removed. The escapes \n, \t, \r, \f, \uXXXX, an escaped space and escaped separators are decoded in keys and values, and a backslash before any other character is dropped, as the Java loader does.

### What happens when a key is both a value and a prefix?

In Nested mode a JSON key cannot hold both a string and an object, so the object wins and the dropped value is listed under Warnings, for example when a=1 appears next to a.b=2. Flat mode keeps both keys unchanged.

### How are duplicates handled?

The last value wins, which is what Properties.load does, and the key is listed under Warnings with every line it appeared on. The JSON keeps the key at the position where it first appeared.

### What does JSON to .properties do with nested objects and arrays?

It always flattens: nested objects become dotted keys and arrays become name[0], name[1], and so on. Booleans and numbers are written as text, and null becomes an empty value.

### Why does the output contain \u00fc instead of ü?

Because Properties.load(InputStream) reads the file as ISO-8859-1, so non-ASCII text must be escaped to survive. Turn off Escape non-ASCII when the file will be read as UTF-8, for example by Properties.load(Reader), Spring Boot, or a modern resource bundle.

### Is my config uploaded?

No. Parsing and writing happen in your browser and no request carries the text. Third-party analytics and ads may load on the page, as on the rest of the site.

### Does it merge Spring profiles or read application.yml?

No. It converts one .properties file. Profile-specific files, relaxed binding and ${placeholder} references are left as written; use Spring's own tooling for the merged view.

### Is this the same as the Env JSON Converter?

No. That tool reads dotenv files, which have different quoting and comment rules and no continuation lines. This page reads Java .properties. Both write JSON and both run in the browser.

## Related Tools

- [Env JSON Converter](https://findutils.com/developers/env-json-converter/)
- [JSON YAML Converter](https://findutils.com/developers/json-yaml-converter/)
- [JSON TOML Converter](https://findutils.com/developers/json-toml-converter/)
- [JSON Formatter](https://findutils.com/developers/json-formatter/)
- [JSON to Java Class](https://findutils.com/developers/json-to-java-class/)
- [YAML Validator](https://findutils.com/developers/yaml-validator/)
