Convert Properties to JSON
Convert Java .properties files to JSON format instantly with this free online tool. The .properties format is a widely used configuration standard in Java applications, Spring Boot projects, and many JVM-based frameworks — but its flat, line-based structure can be limiting when you need to work with modern APIs, JavaScript applications, or tools that expect structured JSON data. This converter intelligently parses your properties content, including dot-notation keys like `server.port=8080`, and transforms them into properly nested JSON objects. Type inference automatically detects numbers, booleans, and strings so your output JSON reflects the correct data types rather than wrapping everything in quotes. Whether you're migrating a legacy Spring application to a Node.js backend, feeding configuration data into a CI/CD pipeline, or simply need to inspect your config in a more readable hierarchical format, this tool handles the heavy lifting in seconds. No installation, no dependencies, no sign-up required — just paste your properties content and get clean, valid JSON output ready to copy, use, or integrate into your workflow.
Input (Properties File)
Options
Output (JSON)
What It Does
Convert Java .properties files to JSON format instantly with this free online tool. The .properties format is a widely used configuration standard in Java applications, Spring Boot projects, and many JVM-based frameworks — but its flat, line-based structure can be limiting when you need to work with modern APIs, JavaScript applications, or tools that expect structured JSON data. This converter intelligently parses your properties content, including dot-notation keys like `server.port=8080`, and transforms them into properly nested JSON objects. Type inference automatically detects numbers, booleans, and strings so your output JSON reflects the correct data types rather than wrapping everything in quotes. Whether you're migrating a legacy Spring application to a Node.js backend, feeding configuration data into a CI/CD pipeline, or simply need to inspect your config in a more readable hierarchical format, this tool handles the heavy lifting in seconds. No installation, no dependencies, no sign-up required — just paste your properties content and get clean, valid JSON output ready to copy, use, or integrate into your workflow.
How It Works
Convert Properties to JSON changes data from Properties into Json. That is more than a cosmetic rewrite. Field layout, quoting, nesting, and even type representation can shift because the destination format has different rules and limits.
Conversion tools are constrained by the destination format. If the source can express nesting, comments, repeated keys, or mixed data types more richly than the target, the output may need to flatten or reinterpret part of the structure.
All processing happens in your browser, so your input stays on your device during the transformation.
Common Use Cases
- Migrating a Spring Boot or Java EE application's configuration files to a Node.js or Python service that consumes JSON config.
- Converting application.properties or application.yml-adjacent files into JSON for use with configuration management tools like Consul or etcd.
- Transforming flat .properties-based i18n locale files into nested JSON objects compatible with JavaScript internationalization libraries like i18next.
- Quickly inspecting and debugging complex Java configuration files by viewing them as a hierarchical JSON tree instead of a flat list of key-value pairs.
- Generating JSON fixtures or test data from existing properties files when writing integration tests for multi-language systems.
- Feeding configuration values from a .properties file into a REST API or JSON-based pipeline without manual reformatting.
- Onboarding new developers who are unfamiliar with the .properties format by converting it to the more universally understood JSON structure for documentation purposes.
How to Use
- Paste your entire .properties file content into the input area on the left — this can include comments (lines starting with # or !), blank lines, and keys using dot notation like `database.host=localhost`.
- The tool immediately parses your input and renders the equivalent JSON structure in the output panel on the right, grouping dot-notated keys into nested objects automatically.
- Review the output JSON to confirm that nested objects, arrays, and data types (numbers, booleans, strings) have been correctly inferred from your property values.
- Use the Copy button to copy the formatted JSON to your clipboard, or download it directly as a .json file for use in your project.
- If you see unexpected output, double-check your .properties file for duplicate keys or non-standard syntax, then re-paste the corrected content for an updated result.
Features
- Dot notation parsing that converts keys like `app.server.port=8080` into fully nested JSON objects: `{ "app": { "server": { "port": 8080 } } }`.
- Automatic type inference that detects integers, floats, booleans (`true`/`false`), and null values so the output JSON uses the correct types rather than plain strings.
- Comment stripping that cleanly removes lines beginning with `#` or `!` from the output without disrupting surrounding key-value pairs.
- Support for multi-line values using the backslash line-continuation character common in Java .properties files.
- Handles both `=` and `:` as key-value delimiters, covering the full range of valid .properties syntax as defined by the Java specification.
- Instant, client-side conversion with no server upload required — your configuration data never leaves your browser, keeping sensitive credentials and settings private.
- Formatted JSON output with proper indentation for maximum readability, ready to drop directly into a codebase or configuration system.
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 can still stress the browser, especially when the tool is working across many JSON values. Split huge jobs into smaller batches if the page becomes sluggish.
- Source values that look similar can map differently in the target format when data types are inferred, flattened, or serialized.
- If the output looks wrong, compare the exact input and option values first, because Convert Properties to JSON should be repeatable with the same settings.
Troubleshooting
- Unexpected output often means the input is being split or interpreted at the wrong unit. For Convert Properties to JSON, that unit is usually JSON values.
- If a previous run looked different, check for hidden whitespace, changed separators, or a setting that was toggled accidentally.
- If nothing changes, confirm that the input actually contains the pattern or structure this tool operates on.
- If the page feels slow, reduce the input size and test a smaller sample first.
Tips
When converting properties files that contain sensitive data like database passwords or API keys, this tool processes everything locally in your browser — nothing is sent to a server, so your secrets stay private. For large configuration files with deeply nested dot keys, scan the JSON output tree to verify the hierarchy matches your intent, especially if any keys share a prefix segment (e.g., `server.name` and `server.name.full` can cause structural conflicts). If your .properties file uses Unicode escape sequences (e.g., `\u0041`), make sure they are properly decoded before converting, as some editors may store them literally. Always validate your output JSON with a JSON linter before dropping it into a production configuration to catch any edge cases introduced during conversion.
Frequently Asked Questions
What is a .properties file and when is it used?
A .properties file is a plain-text configuration format used primarily in Java applications to store key-value pairs outside of compiled code. It's defined by the `java.util.Properties` class in the Java standard library. Common uses include externalizing database URLs, server ports, feature flags, and internationalization strings in frameworks like Spring Boot, Hibernate, and Apache Ant. Each line follows the format `key=value` or `key: value`, with `#` and `!` used for comments.
How does dot notation in .properties files get converted to nested JSON?
Dot notation in .properties keys — such as `app.server.host=localhost` — implies a hierarchical relationship between configuration values. When converting to JSON, each dot-separated segment becomes a level in a nested object. So `app.server.host=localhost` and `app.server.port=8080` together become `{ "app": { "server": { "host": "localhost", "port": 8080 } } }`. This conversion makes the implied structure explicit and consumable by any JSON parser, regardless of programming language.
Will the converter handle type inference, or will all values become strings?
This tool performs automatic type inference on property values. Numeric values like `8080` or `3.14` are output as JSON numbers, boolean-like values (`true`, `false`) become JSON booleans, and everything else is treated as a string. This means your output JSON is semantically correct and ready to use without additional post-processing to cast types. Always review the inferred types for critical values like ports, timeouts, or flags to confirm they match your expectations.
Is it safe to paste sensitive configuration data like passwords or API keys?
Yes. This tool runs entirely client-side in your browser using JavaScript. Your .properties content is never transmitted to any external server — all parsing and conversion happens locally on your machine. That said, it's still good practice to avoid pasting production credentials into any web-based tool when a local alternative exists. For highly sensitive environments, consider running an equivalent command-line conversion script locally.
What happens if I have duplicate keys in my .properties file?
In the Java .properties specification, duplicate keys are technically allowed, with the last occurrence taking precedence. Most converters, including this one, follow the same convention and use the last defined value for any repeated key. If your file contains duplicate keys, review the JSON output carefully to confirm the retained value is the correct one. Duplicate keys in .properties files are often the result of configuration drift and can silently mask intended settings.
What's the difference between converting .properties to JSON vs. converting .properties to YAML?
Both JSON and YAML can represent the same nested configuration hierarchy derived from dot-notated .properties keys, but they serve different audiences. JSON is stricter, universally supported across all programming languages, and ideal for APIs, JavaScript applications, and machine-to-machine communication. YAML is more human-readable, supports comments (which JSON does not), and is popular for Kubernetes manifests, Docker Compose files, and Spring Boot's `application.yml`. If your target system is a JavaScript app or REST service, JSON is the better choice; if you're writing infrastructure-as-code or staying within the Spring ecosystem, YAML is often preferred.
Can I convert JSON back to .properties format?
Yes — the reverse operation (JSON to .properties) is also a common need, particularly when you need to push updated configuration back into a Java application from a JSON-based source. You would need a JSON-to-properties converter for that direction, which flattens nested JSON objects back into dot-notated key-value pairs. Look for a dedicated JSON-to-properties tool on this platform for the reverse workflow.
Does the converter support Unicode escape sequences in .properties files?
The Java .properties format uses `\uXXXX` Unicode escape sequences to encode non-ASCII characters, which is especially common in internationalization files for languages like Chinese, Japanese, or Arabic. Support for these sequences depends on the converter implementation. If your file contains Unicode escapes that are not being decoded correctly in the JSON output, try using a text editor to decode them first (most modern editors like VS Code offer a 'convert escapes' command) before pasting the content into the converter.