Convert Properties to JSON with Flat when the destination expects complete property names such as app.name. Select Nested when it expects an app object with a name property. FindUtils Properties JSON Converter supports both shapes and reports duplicate definitions.

This guide explains how to select the shape, inspect escapes, and convert JSON back into properties. The examples contain invented settings, so you can compare the results without using private configuration.

Why does the JSON shape matter?

A dotted property name does not automatically define a nested object. java.util.Properties stores string keys and values. The application that reads those strings determines their meaning. See the Java Properties documentation.

The FindUtils Nested option applies an additional conversion rule. It splits dotted names into objects. It also interprets suffixes such as [0] as array positions.

  • Literal names: A consumer can expect the complete key app.name.
  • Object structure: Another consumer can expect a name field inside app.
  • Conflicts: app=demo and app.name=notes need two literal keys, but compete for one nested location.

Choose the required shape before you interpret the output. Nested JSON can be easier to read without being the correct import format.

How to convert Properties to JSON

Use the same sample in both modes to see the difference. Leave automatic value conversion off for the first check.

Step 1: Load the properties sample

Open the Properties JSON Converter. Select .properties to JSON. Paste the following sample. You can also select a local .properties file.

1
2
3
4
5
6
app.name=Field Notes
server.port=8080
app.enabled=false
app.features[0]=search
app.features[1]=export
app.welcome=Merhaba d\u00fcnya

Step 2: Inspect the default nested result

Leave Shape set to Nested. Leave Numbers and booleans off. The result contains two top-level keys. The two feature entries become one array.

JSON
1
2
3
4
5
6
7
8
9
10
11
{
  "app": {
    "name": "Field Notes",
    "enabled": "false",
    "features": ["search", "export"],
    "welcome": "Merhaba dünya"
  },
  "server": {
    "port": "8080"
  }
}

The top-level keys are app and server. The converter's six-key count refers to distinct input property names. It does not count the output's top-level objects.

Step 3: Compare the flat result

Select Flat. Each original property name remains a complete JSON key. The Unicode escape still decodes into its character. Values still remain strings.

JSON
1
2
3
4
5
6
7
8
{
  "app.name": "Field Notes",
  "server.port": "8080",
  "app.enabled": "false",
  "app.features[0]": "search",
  "app.features[1]": "export",
  "app.welcome": "Merhaba dünya"
}

Step 4: Select the required value types

Enable Numbers and booleans only when the JSON consumer expects typed values. For this sample, 8080 becomes a number and false becomes a boolean. The feature names and welcome message remain strings.

Step 5: Review warnings before export

Read every duplicate, Unicode, or shape warning. Copy the result or download converted.json. Keep the original document if it contains comments or layout that you need later.

Examples of property rules that affect the output

Properties syntax has rules beyond a simple split at an equals sign. This converter handles colon separators, whitespace separators, continuation lines, and backslash escapes.

Separators and comments

These three lines express the same key and value:

1
2
3
app.name=Field Notes
app.name:Field Notes
app.name Field Notes

Use one form in a real file. If you paste all three, the converter reports duplicate definitions and keeps the final value.

A properties comment starts with # or ! after optional leading whitespace. A hash inside a value remains part of that value. For example, label=Use #blue retains Use #blue.

Quotation marks are ordinary value characters in this format. label="demo" includes the quote characters in the value. Do not apply dotenv quote rules to Java properties.

Continuation lines

A line with an odd number of trailing backslashes continues onto the next line. The parser removes the continuation marker and the next line's leading whitespace.

message=First \
    second

The value becomes First second. The space before the continuation marker remains. Without that space, the two words join as Firstsecond.

Two trailing backslashes represent a literal backslash instead of a continuation. Count the characters when a path or message ends unexpectedly.

A nested name conflict

This input defines two separate properties:

cache=local
cache.ttl=60

Flat preserves both names. Nested creates cache as an object containing ttl. It drops the standalone cache value and reports that conflict.

Do not accept the nested result if local remains necessary. Keep the flat shape or choose a new data model with the destination owner.

Flat, nested, and reverse conversion

Choose the mode from the consumer's contract. The reverse direction always flattens nested JSON; the forward shape option does not change that rule.

TaskMode or settingMain limitation
Preserve complete dotted namesProperties to JSON, FlatValues remain strings unless conversion is active
Inspect groups as objectsProperties to JSON, NestedA value can conflict with a parent object
Produce typed JSONNumbers and booleans onThe tool does not validate an application schema
Create properties from JSONJSON to .propertiesObject paths become dotted names; arrays use indexes
Write portable non-ASCII textEscape non-ASCII as \uXXXX onThe receiving loader still determines the encoding rules

For example, this reverse input contains a string, an array, and a null:

JSON
{"app":{"name": "Field Notes","features":["search","export"],"note": null}}

The output contains four property lines:

1
2
3
4
app.name=Field Notes
app.features[0]=search
app.features[1]=export
app.note=

Null becomes empty text. Empty objects and empty arrays produce no property lines. A later conversion cannot reconstruct those empty containers from their absent entries.

Common mistakes and corrections

Check the actual input format and loader before you treat a conversion result as ready for use.

Mistake 1: Using the dotenv converter

Java properties and dotenv use different separator, comment, and escape rules. Use Env JSON Converter for dotenv input. Use the Properties converter for Java property syntax.

Mistake 2: Accepting a malformed Unicode escape

This converter keeps a malformed Unicode escape literally and adds a warning. Java's Properties.load rejects malformed Unicode escapes. Correct the escape before you use the output as a Java configuration file.

Mistake 3: Assuming every properties loader uses UTF-8

Properties.load(InputStream) uses ISO-8859-1. Properties.load(Reader) uses characters from the supplied reader, whose setup determines byte decoding. It is not automatically a UTF-8 reader. See the Java loader contract.

Keep Unicode escapes active for output that needs them. If uploaded text already contains incorrect characters, escapes cannot restore the original bytes. Decode the original file correctly before conversion.

Mistake 4: Treating a conversion as a configuration merge

The tool converts one document. It does not combine profiles, apply framework precedence, expand placeholders, or calculate the settings of a running application.

Mistake 5: Expecting a lossless return trip

Comments, duplicate definitions, original separators, and empty containers do not survive every conversion. Compare values and structure against an explicit acceptance list. Do not use byte equality as the only check.

Tools used in this guide

FindUtils provides a separate conversion tool for each relevant source format.

FAQ

Q1: Which mode preserves dotted property names? A: Flat mode. A name such as server.port remains one JSON key.

Q2: Does Nested mode preserve every value? A: Not when a value conflicts with a nested parent. The converter reports the conflict and keeps the nested object.

Q3: Does the converter keep numbers as strings? A: Yes, by default. Enable Numbers and booleans when the destination requires typed JSON values.

Q4: Do comments survive JSON conversion? A: No. Keep the original properties document if its comments explain the configuration.

Q5: Does the tool upload my file? A: The converter processes the input in the browser. The page can still load advertisements and other external resources. Use sanitized data for a shared review.

Q6: Does the converter require an account or provide an API? A: The browser page does not require an account. This converter currently has no REST or MCP version.

Next steps

Use the configuration conversion review to record accepted changes. Read the ENV to JSON guide for dotenv rules. Read the JSON to TOML guide for table, array, and null handling.