Properties ⇄ JSON Converter

Client-sideNo sign-upFree

Convert Java .properties files to JSON or JSON to .properties, in either direction, in your browser.

Quick facts

Category
Converters
Best for
Reading a Spring Boot or Java .properties config file as JSON for scripting
.properties
JSON
{ "app.name": "Formatiq", "app.version": "1.0.0", "db.host": "localhost", "db.port": "5432", "db.description": "Multi word value with a colon: like this" }
✓ Converted
Dotted keys like "db.host" are kept flat as-is in JSON, not nested into { db: { host: ... } } - .properties has no native nesting, so guessing at intended structure would be unreliable. Want real nested sections instead? Try the INI ⇄ JSON Converter.
In-content slot
Was this tool helpful?
On this page

Overview

Convert a Java .properties config file into JSON, or JSON back into .properties format, handling the format’s real-world quirks: comments starting with "#" or "!", line continuations where a trailing backslash joins a value onto the next line, and escape sequences like "\n", "\t", "\:", "\=", and "\uXXXX" unicode escapes. Dotted keys like "db.host" are kept flat as-is in the JSON output rather than guessed into a nested structure, since .properties has no native nesting and inferring intended structure from dots alone would be unreliable - the INI ⇄ JSON Converter is the better fit when real nested sections are what you want. Useful for reading a Spring Boot or legacy Java config as JSON for scripting, or generating a .properties file from a JSON config object. Runs entirely client-side.

Best for: Reading a Spring Boot or Java .properties config file as JSON for scripting

How to use this tool

  1. Pick a direction. Switch between .properties → JSON and JSON → .properties with one click.
  2. Paste your input. Drop in a .properties file or a flat JSON object.
  3. Read the converted output. Comments are skipped, line continuations are joined, and escape sequences are resolved automatically.
  4. Swap and repeat. Use the swap button to feed the output straight back in as new input.

Why use this tool

Handles real .properties quirks

Comments, backslash line continuations, and "\n"/"\t"/"\uXXXX" escapes are all resolved, not just simple key=value lines.

Keeps dotted keys flat

No guessing at intended nesting from dots in a key name - the mapping stays predictable.

Round-trip escaping

Converting JSON back to .properties re-escapes special characters (colons, backslashes, newlines) correctly.

Nothing leaves your browser

Conversion happens entirely client-side - useful when the config contains real connection strings or credentials.

Frequently asked questions

.properties files have no native nesting syntax - a dot in a key name is just a naming convention some tools use, not a structural marker the format itself understands. Guessing at intended nesting from dots alone would be unreliable, so this tool keeps them flat. If you have genuinely nested config, the INI ⇄ JSON Converter supports real [section] nesting instead.

Comments (lines starting with "#" or "!") are skipped during .properties → JSON, since JSON has no comment syntax to preserve them in. Converting JSON back to .properties won’t restore any comments that were in the original file.

.properties → JSON resolves "\n" to a real newline, "\t" to a tab, "\uXXXX" to the corresponding Unicode character, and "\:"/"\=" to literal colons and equals signs inside values. Converting back to .properties re-escapes backslashes, colons, newlines, and tabs so the output stays valid.

Explore more free tools

Formatters, converters, validators, and generators - all free and running entirely in your browser.

Browse more tools