Convert Properties to JSON
Convert Java .properties files to JSON. Supports dot-notation keys for nested objects. 100% client-side.
Paste your .properties key-value pairs and get clean, valid JSON back — with dot-notation keys automatically nested into objects and bracket indexes turned into real arrays. No manual quoting, no misplaced commas. And everything runs in your browser. Nothing gets uploaded.
How It Works
The parser splits your input line by line, skips comments (# and !) and blank lines, then looks for = or : separators. When "Nest dot keys" is on, it walks each dotted key segment and builds the nested structure. Line continuations with trailing backslashes are joined before parsing — same behavior as Java's Properties class.
Examples
Spring Boot Database Config
Migrating application.properties to a JSON-based config system.
spring.datasource.url=jdbc:mysql://localhost:3306/mydb
spring.datasource.username=root
spring.datasource.password=secret123
spring.jpa.hibernate.ddl-auto=update
{
"spring": {
"datasource": {
"url": "jdbc:mysql://localhost:3306/mydb",
"username": "root",
"password": "secret123"
},
"jpa": {
"hibernate": {
"ddl-auto": "update"
}
}
}
}
Flat Key-Value Pairs for i18n
Translation files that don't need nesting — just a straight key-to-value map.
greeting=Hello
farewell=Goodbye
error.404=Page not found
error.500=Server error
{
"greeting": "Hello",
"farewell": "Goodbye",
"error.404": "Page not found",
"error.500": "Server error"
}
Array Values in Properties
Some legacy configs store lists using bracket notation. The converter picks up on that and builds real arrays.
# Server list
servers[0]=10.0.0.1
servers[1]=10.0.0.2
servers[2]=10.0.0.3
app.name=LoadBalancer
app.timeout=30
{
"servers": [
"10.0.0.1",
"10.0.0.2",
"10.0.0.3"
],
"app": {
"name": "LoadBalancer",
"timeout": "30"
}
}
Who Uses This
Converting Spring Boot or legacy Java configs to JSON for modern tooling.
Transforming app configs during CI/CD pipeline migrations to JSON-based systems.
Moving backend .properties files into Node.js or Python projects that expect JSON config.
Learning how properties files map to JSON structure for coursework and assignments.
Common Mistakes
If your keys use dot notation (like server.host) but nesting is off, you'll get flat keys in the output. Turn it on when you want {"server": {"host": "..."}} instead of {"server.host": "..."}.
The standard separators are = and :. If your file uses only whitespace between key and value, the parser might not split them correctly. Stick with key=value or key: value.
Properties files are all strings. A value like port=3306 becomes "port": "3306" in the JSON — it won't auto-convert to a number. You will need to cast types in your application code.
Technical Details
- Processing: 100% client-side — nothing uploaded
- Browser Support: Chrome, Firefox, Safari, Edge
- Separators: Recognizes both
=and: - Line Continuations: Trailing backslash joins lines (Java spec compliant)
- Output: Pretty-printed JSON with 2-space indentation
Frequently Asked Questions
How do I convert a .properties file to JSON?
Paste the contents of your .properties file into the input box and hit Convert. The JSON appears on the right side. You can copy it or download it as a .json file — no signup, no install needed.
Does it handle nested keys like Spring Boot properties?
Yes. Turn on "Nest dot keys" and dotted keys like spring.datasource.url become nested JSON objects: {"spring": {"datasource": {"url": "..."}}}. Without that option, dotted keys stay flat.
Are arrays supported in properties files?
They are. Keys with bracket notation — items[0], items[1], etc. — get converted into a proper JSON array. The index numbers determine the order.
Is it safe to paste config files with passwords?
Your data stays in your browser. Nothing is sent to any server — the conversion runs entirely in JavaScript on your device. That said, it is still good practice not to keep passwords in plain text configs. Consider using environment variables or a secrets manager instead.
What's the difference between .properties and YAML?
Properties files are flat key-value pairs — simple but limited. YAML supports nesting, lists, and multi-line strings natively. JSON sits somewhere in between: structured but stricter about syntax. If your stack already reads JSON, converting from .properties is the fastest path.