JSON to Property Converter

JSON Input

Property Output

How this JSON to Properties converter works

Paste any nested JSON object on the left to flatten every path into Java .properties key=value entries on the right. Conversion happens 100% client-side in your browser — ideal for migrating JSON configs or i18n translation bundles into Java, Spring Boot, or Gradle property files. Going the other direction? Use the Property to JSON Converter.

JSON to .properties flattening rules

JSON Input Flattened .properties Output
{"db": {"host": "localhost", "port": 5432}} db.host=localhost and db.port=5432
{"hosts": ["a.internal", "b.internal"]} hosts[0]=a.internal and hosts[1]=b.internal
{"users": [{"name": "Ada"}]} users[0].name=Ada
{"debug": true, "retries": 3} debug=true and retries=3
{"optional": null} optional=null

Common pitfalls when flattening JSON to .properties

  • Keys containing literal dots: Plain java.util.Properties keys are flat strings, so a dot means nothing there; it is Spring Boot that reads each dot as a level of nesting. A backslash doesn’t protect a dot (Properties.load() drops a backslash before a character that isn’t an escape, so org\.example reads as org.example). When Spring must keep a map key exactly as written, bracket that segment under its prefix: logging.level.[org.example]=INFO. The converter writes keys as they are, so add brackets by hand.
  • Special characters and newlines are not escaped: The converter writes keys and values exactly as they are in the JSON. Properties.load() ends a key at the first space, = or :, reads \ as an escape and ends the entry at a line break, so escape these by hand: a key’s space, = or : with a backslash (my\ key), a backslash as \\, and a newline in a value as \n.
  • Type information is flattened to text: In .properties, "42" and 42 both become key=42. The consuming Java/Spring framework parses the target type based on your @ConfigurationProperties field types.

FAQs

Can I use this for i18n JSON translation files to Java ResourceBundle .properties? Yes. Flattening nested frontend translation JSON ({"nav": {"home": "Home"}} → nav.home=Home) produces clean keys ready for Java ResourceBundle or Spring MessageSource files.
Is my JSON configuration sent to any server? No. Everything runs locally in your browser via JavaScript, so the JSON you paste never leaves your browser. The page only records anonymous usage events (such as a conversion or a copy click), never the content.
Can I convert JSON to YAML instead? Yes — use the JSON to YAML Converter for indented application.yml or Kubernetes YAML output.

More Free Developer Tools