Convert JSON to Properties

Convert JSON objects to .properties format with dot notation.

Input (JSON)
Options
Output (Properties)

What It Does

The JSON to Properties Converter is a fast, browser-based utility that transforms JSON configuration objects into the standard Java `.properties` file format. Whether you're working with Spring Boot, Hibernate, or any Java-based application that relies on key-value configuration files, this tool eliminates the tedious manual work of reformatting your configs by hand. The conversion process flattens nested JSON structures using dot notation — the universally accepted convention in Java properties files. For example, a JSON object like `{"database": {"host": "localhost", "port": 5432}}` becomes clean, readable `database.host=localhost` and `database.port=5432` entries. Arrays are handled with zero-based index notation (e.g., `servers.0=host1`, `servers.1=host2`), so even complex configurations migrate accurately. This tool is especially valuable for developers transitioning from modern JSON-based configuration systems — such as Node.js apps, Docker Compose files, or REST API payloads — into Java or Kotlin ecosystems. It's also indispensable when you receive configuration data in JSON format from CI/CD pipelines or front-end teammates and need to drop it straight into a Java project. The output is fully compatible with `java.util.Properties`, Spring Boot's `application.properties`, Apache Commons Configuration, and similar frameworks. Special characters are escaped according to the `.properties` specification, so values load correctly without modification. Unlike error-prone manual conversion — particularly painful for deeply nested objects — this converter handles the entire flattening process instantly, accurately, and privately in your browser.

How It Works

The Convert JSON to Properties applies its selected transformation logic to your input and produces output based on the options you choose.

It applies a fixed set of transformation rules to your input, so the output is stable and easy to verify.

All processing happens in your browser, so your input stays on your device during the transformation.

Common Use Cases

  • Converting application.json config files into Spring Boot application.properties format for immediate use in a Java project
  • Migrating Node.js or Docker Compose JSON configuration files into Java application property files when switching technology stacks
  • Generating Java .properties key bundles for internationalization (i18n) from JSON translation files exported by design or content tools
  • Creating .properties configuration files from API-returned JSON settings during automated CI/CD pipeline setup or deployment scripting
  • Converting deeply nested JSON environment configs for use with Apache Commons Configuration or similar Java configuration libraries
  • Preparing configuration data received from front-end teams in JSON format for direct consumption by Java or Kotlin back-end services
  • Quickly testing different Spring Boot property values by converting sample JSON payloads without manually reformatting each key

How to Use

  1. Paste or type your JSON configuration object into the input field — ensure it is valid JSON with all keys quoted and values correctly formatted (use a JSON validator first if you are unsure)
  2. Trigger the conversion by clicking the Convert button; many modes will also process your input automatically as you type, giving you instant feedback
  3. Review the flattened output in the properties panel — nested JSON objects appear as dot-separated key paths (e.g., `spring.datasource.url`) and arrays appear with zero-based index suffixes (e.g., `allowed.origins.0`)
  4. Check string values that contain special characters such as colons, equals signs, or backslashes — the tool escapes these per the Java .properties specification so they load correctly in any compliant parser
  5. Copy the generated properties content using the Copy button and paste it directly into your `application.properties`, `config.properties`, or any `.properties` file in your project
  6. Verify the output loads correctly in your Java framework — for Spring Boot, test with `@Value` annotations or the `Environment` bean to confirm keys resolve as expected

Features

  • Flattens nested JSON objects of arbitrary depth into dot-notation key paths (e.g., `database.connection.pool.size=10`) without truncation or data loss
  • Handles JSON arrays using zero-based index notation (e.g., `allowed.origins.0=https://example.com`, `allowed.origins.1=https://api.example.com`)
  • Produces spec-compliant output compatible with `java.util.Properties`, Spring Boot `application.properties`, and Apache Commons Configuration
  • Automatically escapes special characters — including colons, equals signs, Unicode sequences, and backslashes — according to the official .properties file specification
  • Faithfully converts JSON null, boolean, and numeric values to their string representations so no data is silently dropped or misrepresented
  • Processes deeply nested and complex JSON payloads instantly with no file size restrictions that would slow down large configuration migrations
  • Runs entirely in the browser with no server-side processing — your configuration data, secrets, and credentials never leave your machine

Examples

Below is a representative input and output so you can see the transformation clearly.

Input
{"name":"Ada","score":9}
Output
name=Ada
score=9

Edge Cases

  • Very large inputs may take a few seconds to process in the browser. If performance slows, split the input into smaller batches.
  • Mixed formatting (tabs, line breaks, or inconsistent delimiters) can affect output. Normalize spacing first if needed.
  • Convert JSON to Properties follows the selected options strictly. If the output looks unexpected, re-check option settings and input format.

Troubleshooting

  • Output looks unchanged: confirm the input contains the pattern this tool modifies and that the correct options are selected.
  • Output differs from a previous run: confirm that the input and every option match, because deterministic tools should repeat when the settings are identical.
  • Unexpected characters: check for hidden whitespace or encoding issues in the input and try normalizing first.
  • Slow processing: reduce input size or try a modern browser with more available memory.

Tips

If your JSON contains arrays of objects rather than primitive arrays, the output will produce indexed paths like `servers.0.host=localhost` and `servers.0.port=8080` — verify these match the key pattern your Java framework expects before deploying. Spring Boot users should note that the framework recommends kebab-case property names (e.g., `spring.jpa.open-in-view`) over camelCase; if your JSON uses camelCase keys, consider renaming them in the output to align with Spring Boot conventions and avoid subtle resolution issues. When migrating large configurations, convert and test one logical section at a time — Java `.properties` values are always strings, so numeric and boolean fields must be explicitly parsed in code (e.g., `Integer.parseInt()` or `Boolean.parseBoolean()`), and catching type mismatches early prevents hard-to-debug runtime errors.

### Understanding Java .properties Files and Why JSON Conversion Matters The `.properties` file format has been a cornerstone of Java application configuration for decades. Defined as part of the `java.util.Properties` class in the standard library, it uses a simple `key=value` structure where every entry is a plain string. Despite the rise of richer formats like YAML and TOML, `.properties` files remain deeply embedded in the Java ecosystem — used by Spring Boot, Hibernate, Log4j, Maven resource filtering, and countless enterprise applications worldwide. **The Structure of a .properties File** At its simplest, a `.properties` file looks like this: ``` app.name=My Application app.version=2.1.0 database.host=localhost database.port=5432 ``` Nesting is implied, not enforced — there is no actual hierarchy in the file itself. Instead, dots in key names create a logical grouping that frameworks like Spring Boot understand and map to structured configuration objects. This dot-notation convention is what makes converting from JSON so natural: a JSON object's nesting maps directly onto the dot-separated key paths that `.properties` files rely on. **Why JSON is Often the Source Format** Modern development workflows frequently produce configuration in JSON. REST APIs return settings as JSON payloads. Infrastructure-as-code tools like Terraform and AWS CloudFormation output resource details in JSON. Front-end developers share environment configs as JSON objects. When these configurations need to reach a Java application, a format translation step is unavoidable — and doing it by hand is both tedious and error-prone, especially for deeply nested structures with five or six levels of hierarchy. Automated conversion ensures that every key is captured, nesting levels are correctly expanded, and special characters are properly escaped — things that are easy to miss when reformatting manually. **JSON to Properties vs. JSON to YAML** Developers sometimes debate whether to use `.properties` or YAML for Spring Boot configuration. YAML supports native nesting, making it visually cleaner for complex configs, while `.properties` is simpler to parse, diff, and use in shell scripts. If your target framework supports both, the choice often comes down to team preference. However, `.properties` remains the more universally compatible format across all Java configuration tools — some older libraries and build systems do not support YAML at all. **Arrays, Nulls, and Edge Cases** One area where JSON-to-properties conversion requires care is arrays. JSON arrays of primitives (`["a", "b", "c"]`) become indexed keys (`key.0=a`, `key.1=b`, `key.2=c`). Arrays of objects create multiple indexed sub-trees. Spring Boot can reconstruct these into `List` or `Set` beans automatically, but you must ensure your code is using the correct binding annotations (`@ConfigurationProperties` with typed lists works best). Null values in JSON have no direct equivalent in `.properties` files since all values are strings. Most converters, including this one, represent JSON `null` as the literal string `null` — which means you need to handle null-checking in your application code rather than relying on the property being absent. **Historical Context and Continued Relevance** The `.properties` format dates back to Java 1.0, making it one of the oldest configuration formats still in active use in any major programming ecosystem. Its longevity is a testament to its simplicity and reliability. Even as Spring Boot has popularized YAML and as cloud-native environments push toward environment variables and secret managers, `.properties` files persist because they are human-readable, diff-friendly, easy to version-control, and supported by virtually every Java tool ever built. Understanding how to convert between formats fluently is a practical skill for any Java developer working in heterogeneous environments.

Frequently Asked Questions

What is a Java .properties file and how is it different from JSON?

A Java `.properties` file is a plain-text configuration format used by Java applications, where each line contains a `key=value` pair. Unlike JSON, it has no native support for nested structures — nesting is represented using dot-separated key names by convention. JSON is a hierarchical data format widely used in web APIs and modern tooling. The two formats serve similar purposes, but `.properties` is the standard for Java frameworks like Spring Boot, while JSON is more common in cross-platform and web contexts.

How does the converter handle nested JSON objects?

Nested JSON objects are flattened using dot notation. For example, `{"server": {"host": "localhost", "port": 8080}}` becomes `server.host=localhost` and `server.port=8080`. The converter recurses through all levels of nesting, so even deeply nested structures like `{"a": {"b": {"c": "value"}}}` are correctly expanded to `a.b.c=value`. There is no depth limit on the nesting it can handle.

How are JSON arrays converted to .properties format?

JSON arrays are converted using zero-based index notation appended to the key name. For example, `{"colors": ["red", "green", "blue"]}` becomes `colors.0=red`, `colors.1=green`, and `colors.2=blue`. Arrays of objects produce multiple indexed sub-trees, such as `users.0.name=Alice` and `users.1.name=Bob`. Spring Boot can automatically bind these indexed properties back into `List` or `Set` fields using `@ConfigurationProperties`.

Is this tool compatible with Spring Boot application.properties?

Yes, the output is fully compatible with Spring Boot's `application.properties` file. Spring Boot uses the `java.util.Properties` parser under the hood and additionally supports relaxed binding, so dot-notated keys map directly to `@ConfigurationProperties` beans and `@Value` expressions. After conversion, you can paste the output directly into your `src/main/resources/application.properties` file and Spring Boot will load it on startup.

What happens to special characters like equals signs or colons in values?

The `.properties` specification requires that certain characters in values be escaped. Equals signs (`=`) and colons (`:`) in key names must be escaped with a backslash, as must backslashes themselves. The converter handles this escaping automatically, so you don't need to manually adjust the output before using it. Unicode characters are also handled correctly, ensuring that international strings and special symbols load without corruption.

Does the tool send my configuration data to a server?

No. The conversion runs entirely in your browser using client-side JavaScript. Your JSON input — which may contain hostnames, credentials, API keys, or other sensitive configuration — is never transmitted to any external server. This makes the tool safe to use with real configuration data, though it's still best practice to rotate any secrets that you paste into browser-based tools as a general security precaution.