PROPERTIES to JSON Converter Online — Free & Private

Paste Properties and get JSON output. Everything runs in your browser and nothing is uploaded.

Loading…
Properties → JSON for Java configuration
Reads Java .properties lines and writes a flat JSON object, with every value as a string.

Developer notes

Dotted keys such as db.host stay flat keys. They are not nested into objects. Both = and : separate a key from its value, and a trailing backslash continues the value on the next line. Lines that start with # or with an exclamation mark are comments and are dropped, so the JSON has no comment syntax. Escapes such as \n and \u00e9 are decoded. Numbers and booleans stay strings, because a .properties file has no types.

Use cases

Read an application.properties file into a tool that only accepts JSON. Compare two property files as JSON. Check which keys a Spring profile defines.

About these options

For CSV output, choose the delimiter, how fields are quoted, the line endings and whether to write a header row. Auto uses a comma in English and a semicolon in French, German and Spanish, as Excel expects. For CSV input, the delimiter is detected on the first line (comma, semicolon, tab or pipe). You choose whether that line holds the column names. JSON output can use 2 or 4 spaces or a single line, with an optional recursive key sort. XML output can be pretty-printed with a chosen indent width. YAML output takes an indent width and a quoting mode for strings. XML comments are dropped, because the conversion goes through a JSON tree.

Examples

Spring-style keys and a comment

Input

app.name=FastMinify app.version=2.1.0 app.env=production # database settings db.host=db.internal db.port=5432 db.ssl=true feature.checkout-v2.enabled=true

Output

{ "app.name": "FastMinify", "app.version": "2.1.0", "app.env": "production", "db.host": "db.internal", "db.port": "5432", "db.ssl": "true", "feature.checkout-v2.enabled": "true" }

Colon separator, escapes and a continued line

Input

greeting:Hello\nWorld motd=Line one \ line two name=caf\u00e9

Output

{ "greeting": "Hello\nWorld", "motd": "Line one \n line two", "name": "café" }

Related tools

Other converters that start from Properties are linked on this page.

Properties → JSON FAQ

How lines are read

Are numbers and booleans typed?

No. A .properties file has no types, so every value stays a string, for example "5432" and "true".

What about .properties comments?

They are removed during the read. The output is strict JSON, not JSONC, so a line like # database settings never appears in the result.

Are dotted keys nested?

No. A key such as db.host stays one flat key in the JSON object.

Is my data sent to a server?

No. The conversion runs in your browser, and FastMinify never receives what you paste.

Convert Java .properties files to JSON, YAML, INI and TOML.