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
- 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)
- Trigger the conversion by clicking the Convert button; many modes will also process your input automatically as you type, giving you instant feedback
- 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`)
- 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
- 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
- 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.
{"name":"Ada","score":9}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.
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.