.properties to JSON Converter

Convert Java .properties files to JSON with nested dotted keys, type inference, and the comment above each key kept in $comments. 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 values are inferred to real JSON types, and a comment written directly above a property is kept in a $comments map. Keys and values are read with the java.util.Properties syntax: =, : and whitespace separators, # and ! comments, backslash line continuations, and \uXXXX escapes. Blank lines, and comment blocks separated from the next property by a blank line, are not carried into the JSON.

.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 reads that syntax as java.util.Properties defines it — 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 stores the # or ! block sitting directly on top of a property in a $comments field; a header block followed by a blank line has no property to attach to and is left out.

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

How to convert .properties to JSON

  1. 1

    Paste your .properties content

    Copy the file into the input panel, or click the flask icon for a sample with a comment and dotted app.* keys. Keys and values may be separated by =, :, or whitespace.

  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

    Continuation lines ending in a backslash are joined, escapes such as \u00e9 and \: are decoded, and a comment block that sits directly above a property is attached to it before dotted keys are nested.

  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 read .properties files the way Java does?
For keys and values, yes: they can be separated by =, :, or plain whitespace, comments start with # or !, multi-line values continue after a trailing backslash, and \uXXXX escapes are decoded. If a key appears twice, the later value wins, as it does with Properties.load. The JSON is not a full copy of the file, though: blank lines and comments that are not directly above a property are dropped.
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?
Only comments that belong to a property. A block of # or ! lines directly above a key, with no blank line in between, is stored in $comments under that key's dotted path. A file header, a comment followed by a blank line, a comment at the very end of the file, and the blank lines themselves are not kept. Switch Comments to "Ignore" in Advanced options to drop comments entirely.
How are boolean and numeric .properties values handled?
With Infer types on, exact true and false become booleans and plain decimal numbers such as 8080 or 0.75 become JSON numbers. Values that would change on the way back—1.0, 007, or a version like 1.2.3—stay strings. Turn Infer types off to keep every value as text.
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.