Properties Formatter & Validator

Last updated:

Paste a Java .properties file (application.properties and similar), normalize its formatting or convert it to JSON — follows real java.util.Properties syntax, including line continuation and \uXXXX escapes. All in your browser, nothing uploaded.

How it works

  • Format re-serializes with normalized key=value spacing and escaping, joins a continuation line (a trailing \) into a single physical line, and keeps your comments and blank lines exactly where they were.
  • To JSON flattens every key into a JSON object — a dotted key like db.host stays one literal string key, it does not nest into a db object containing host. That matches what java.util.Properties itself does with the key; Spring Boot’s hierarchical binding of dotted keys is a framework convention layered on top of this file format, not part of it.
  • Follows real java.util.Properties.load() syntax: key=value, key:value, and even key value (whitespace alone is a valid separator), backslash escapes (\\ \n \t \r \f \: \= \ and \uXXXX), and line continuation.
  • The most permissive formatter in this family — a bare word with no separator at all (debugEnabled) is valid, not an error: it’s a key with an empty-string value, exactly matching what a real Properties file parser does. The one hard parse error is a malformed \uXXXX escape (not exactly 4 hex digits).

To JSON keeps every value as a string — no number/boolean inference, unlike this site’s INI formatter. Properties has no type system at all, not even as a quoting convention: Properties.getProperty() always returns a string. A duplicate key doesn’t block Format or To JSON — the last definition wins, the same as Properties.load() overwriting an earlier entry in its backing table — but you’ll see a note above the output naming both lines.

Runs entirely in your browser — nothing you paste here is uploaded, logged, or stored. No autosave, by design, since config properties files sometimes contain database URLs or internal hostnames.

🔧 Also try: JSON Formatter → 🗃️ Also try: INI Formatter →