Free Toolkit

JSON to PropertiesConvert JSON objects to Java .properties format with dotted key notation.

JSON to Properties illustration
🔄

JSON to Properties

Convert JSON objects to Java .properties format with dotted key notation.

How to Use
1

Paste JSON

Paste a JSON object into the input field.

2

View .properties output

Nested objects are flattened to dotted key notation.

3

Copy result

Copy the .properties output for your Java application.

What Is JSON to Properties?

JSON to Properties converts JavaScript Object Notation into Java-style .properties file format. Properties files use simple key=value syntax with dotted keys for hierarchy (e.g., db.connection.host=localhost). This converter flattens nested JSON objects into dotted key notation, handles arrays with indexed keys, and escapes special characters. The output is ready for use in Java applications, Spring Boot configuration, and i18n message bundles.

Why Use Our JSON to Properties?

  • Nested objects flattened to dotted key notation automatically.
  • Arrays converted to indexed keys (array[0], array[1]).
  • Special characters properly escaped for .properties format.
  • Clean output ready for Java and Spring Boot applications.

Common Use Cases

Spring Boot Config

Generate application.properties from JSON configuration data.

Java i18n

Create Java message bundle .properties files from JSON translation data.

Legacy Integration

Convert JSON config to .properties for legacy Java applications.

Build Configuration

Generate .properties files for Maven, Gradle, or Ant build systems.

Technical Guide

The converter recursively traverses the JSON structure, building dotted key paths. For each primitive value encountered, a key=value line is output using the accumulated path. Nested objects add their key to the path with a dot separator. Arrays use bracket notation with zero-based indices (e.g., items[0]=value). This recursive approach handles JSON of any depth. Values are escaped for the .properties format: backslashes are doubled, newlines become \n, and tabs become \t. This ensures the output can be parsed correctly by Java's Properties class. The output uses = as the key-value separator and outputs one property per line, matching standard Java .properties format.

Tips & Best Practices

  • 1
    Nested JSON objects produce dotted keys: {"a":{"b":"c"}} → a.b=c.
  • 2
    Arrays use indexed notation: [0], [1], etc.
  • 3
    Newlines and tabs in values are escaped with backslash notation.
  • 4
    The output is compatible with Java Properties, Spring Boot, and similar frameworks.

Related Tools

Frequently Asked Questions

QHow are nested objects handled?
Nested objects are flattened using dotted key notation: {"a":{"b":"c"}} becomes a.b=c.
QHow are arrays handled?
Arrays use indexed bracket notation: items[0]=first, items[1]=second.
QAre special characters escaped?
Yes, backslashes, newlines, and tabs are properly escaped for .properties format.
QCan I convert back?
Yes, use our Properties to JSON converter for the reverse direction.
QIs the output compatible with Java?
Yes, the output follows standard Java .properties format and can be loaded by java.util.Properties.

About JSON to Properties

JSON to Properties is a free online tool from FreeToolkit.ai. All processing happens directly in your browser — your data never leaves your device. No registration required. No ads. Just fast, reliable tools.