BYTETOOLS

Java Properties to JSON Converter

Convert Java .properties files to JSON and back online. Handles = and : separators, backslash continuations, \uXXXX escapes and dotted-key nesting.

Drop a .properties file here or click to browse

What is the Java Properties to JSON Converter?

The ByteTools Java Properties to JSON Converter translates . properties files — the standard configuration format of Java, Spring and Kafka applications — into JSON, and converts JSON back to .

  • Full java.util.Properties parsing rules
  • Backslash line continuations and \uXXXX escapes
  • = , : and whitespace separators supported
  • Dotted keys optionally expanded to nested JSON
  • Reverse JSON → .properties with correct escaping
  • 100% private, in-browser conversion

How to use the Java Properties to JSON Converter

  1. 1

    Choose the direction: .properties → JSON or JSON → .properties.

  2. 2

    Paste your content or drop the file.

  3. 3

    For .properties input, choose whether dotted keys become nested objects.

  4. 4

    Click Convert.

  5. 5

    Copy the result or download it.

About the Java Properties to JSON Converter

The ByteTools Java Properties to JSON Converter translates .properties files — the standard configuration format of Java, Spring and Kafka applications — into JSON, and converts JSON back to .properties in the same tool. The parser follows java.util.Properties rules: = or : separators, # and ! comments, backslash line continuations and \uXXXX unicode escapes.

Dotted keys like db.pool.size can be expanded into nested JSON objects, which is usually what Spring-style configuration means, or kept flat as literal keys. Going the other way, nested JSON is flattened back to dotted keys, with special characters escaped and an option to encode non-ASCII text as \uXXXX for older tooling.

Everything runs 100% locally in your browser — application configuration, which frequently contains URLs and secrets, is never uploaded to any server.

Frequently asked questions

How are dotted property keys converted to JSON?

With expansion enabled, server.port=8080 becomes {"server": {"port": "8080"}} — each dot introduces one level of nesting, matching how Spring binds properties to configuration objects. With expansion off, the whole key "server.port" stays as one flat JSON key.

Does the parser handle multi-line property values?

Yes. A line ending in a single backslash continues onto the next line with its leading whitespace stripped, exactly as java.util.Properties reads it — a doubled backslash is a literal backslash, not a continuation.

What do the \uXXXX sequences mean?

They are unicode escapes from the era when .properties files had to be Latin-1: caf\u00e9 means café. The converter decodes them when reading, and can re-encode non-ASCII characters the same way when generating .properties output for older toolchains.

Are property values typed in the JSON output?

No — every value stays a string, because .properties has no type system and port=8080 is genuinely text until the application parses it. Keeping strings avoids corrupting values like version numbers or zero-padded IDs.

What happens to duplicate keys?

The last occurrence wins, which is exactly what java.util.Properties does when loading the file, so the JSON reflects what your application would actually see.

Related tools