.properties to JSON Converter

Convert Java .properties files to JSON with lossless parsing, nested keys, and comment preservation. Client-side only.

Paste a Java .properties file and this tool converts it into JSON instantly in your browser. Dotted keys like app.cache.ttl become nested objects by default, numeric and boolean-looking values are inferred to real JSON types, and comment lines are kept as $comments fields so nothing documented in the original file is lost. The underlying parser is lossless, preserving comments, blank lines, and key order exactly as Java's own java.util.Properties would read them.

.properties Input

Upload

Advanced optionsConvertClear

JSON Output

Result will appear here...

CopyDownload

Result will appear here...

About the Properties to JSON Converter

Java's .properties format (key=value, key:value, or key value, with # or ! comments) has been the standard config and i18n resource-bundle format since the early java.util.Properties API. This tool parses that format with the same rules the JVM uses — including line continuations with a trailing backslash and \uXXXX unicode escapes — and produces JSON you can inspect, diff, or feed into a JavaScript build pipeline. Dotted-key nesting turns app.cache.ttl=60 into { "app": { "cache": { "ttl": 60 } } }, type inference turns "false" into a real boolean, and comment handling keeps the # lines that documented each property as a $comments field.

You May Also Need

JSON to Properties

Convert JSON objects to Java .properties format with dotted-key flattening.

Open tool

Env to JSON

Convert .env files to JSON with type inference and nested keys.

Open tool

JSON Formatter & Validator

Format, validate, and visualize JSON data.

Open tool

YAML to JSON

Convert YAML to JSON or JSON to YAML.

Open tool

Paste a Java .properties file and this tool converts it into JSON instantly in your browser. Dotted keys like app.cache.ttl become nested objects by default, numeric and boolean-looking values are inferred to real JSON types, and comment lines are kept as $comments fields so nothing documented in the original file is lost. The underlying parser is lossless, preserving comments, blank lines, and key order exactly as Java's own java.util.Properties would read them.

How to convert .properties to JSON

  1. 1

    Paste your .properties content

    Copy the contents of your .properties file into the input panel, or click the flask icon to load a sample with a comment and dotted keys.

  2. 2

    Adjust advanced options if needed

    Open Advanced options to toggle type inference, dotted-key nesting (and its separator), and whether comments are kept as $comments or ignored.

  3. 3

    Click Convert

    The lossless parser reads properties, comments, and blank lines in file order and produces a JSON object. Toggling an option afterward recomputes immediately.

  4. 4

    Copy or download the JSON

    Copy the JSON or download it as a .json file. Use the switch-direction icon to jump to JSON to Properties for the reverse conversion.

References

Related developer tools

Properties to JSON FAQ

How do I convert a Java .properties file to JSON online?
Paste the contents of your .properties file into the input panel and click Convert. Each key=value line becomes a JSON field, and dotted keys are nested by default. Copy the result or download it as a .json file.
Does this tool follow the Java Properties file format exactly?
Yes. Parsing follows the same rules as java.util.Properties: keys and values can be separated by =, :, or plain whitespace, comments start with # or !, and multi-line values use a trailing backslash for continuation.
Is my .properties file uploaded to a server?
No. All parsing happens locally in your browser using JavaScript — nothing is sent over the network, which matters for properties files containing internal hostnames or credentials.
Can I convert dotted .properties keys into nested JSON objects?
Yes. With "Dotted keys → nested" enabled (default separator "."), a key like server.port=8080 becomes { "server": { "port": 8080 } }. Disable it to keep the flat dotted key as a single JSON field instead.
Does converting .properties to JSON preserve comments?
By default, yes — comment lines are attached to the property they precede and kept in the output as a $comments field. Switch Comments to "Ignore" in Advanced options to drop them and get a clean values-only JSON object.
How are boolean and numeric .properties values handled?
With Infer types on, values like true, false, or 1.2.3-style version numbers that look numeric are converted to JSON booleans and numbers where valid. Turn Infer types off to keep every value as a plain string, matching the raw .properties file.
What's the difference between .properties and JSON?
Java .properties files are line-oriented key-value text used for application config and i18n resource bundles, while JSON supports nested structures and typed values natively. Converting lets you diff properties files as structured data or import them into JavaScript/TypeScript tooling that expects JSON.