Skip to content
ToolPlankDEV
Developer Tools
100% In-Browser Execution

Updated:

Properties to JSON Converter

Paste a .properties file and get JSON as you type. This properties to json converter builds nested objects from dotted keys, turns list[0] keys into arrays, decodes \u escapes and line continuations, and lists every key clash with its line number. Nothing is uploaded.

Options:

Properties

Input
0 chars · 0 lines

JSON

Ready
Processing in browser...
0 chars · 0 linesUpdates as you type

Notes

Key clashes, repeated keys and decoded escapes appear here once there is a result.

Processed on your device. Your text is not sent to our servers.

More free tools you may need next.

Quick Guide

How to use Properties to JSON

Simple step-by-step instructions to get the exact output you need.

  1. 01

    Paste your properties file

    Paste the file into the left box, press Paste, or open a .properties file. Example loads an application.properties with a list, an escape and comments. Spring Boot, Messages and Clashing keys load smaller samples.

  2. 02

    Read the JSON and the notes

    The JSON appears on the right as you type. The Notes panel lists key conflicts, repeated keys, decoded escapes and joined lines, each with its line number, so nothing changes without you seeing it.

  3. 03

    Choose structure, values and layout

    Build nested objects or keep flat keys, decide whether 8080 and true become a number and a boolean or stay text, turn list[0] keys into arrays or keep them as names, and pick the indent or minified output.

  4. 04

    Copy or download

    Press Copy to paste the JSON into your project, or Download to save it as config.json.

How to convert properties to JSON

A .properties file is a flat list of key=value lines, and JSON holds the same settings as nested objects. To convert properties to json, the tool splits each key at its dots and builds the groups, so server.port=8080 becomes a server object with a port inside it.

Take these lines:

properties
server.port=8080
server.ssl.enabled=true
app.cors.origins[0]=https://example.com
app.cors.origins[1]=https://admin.example.com
build.number=007

They become this JSON. The port is a number, the flag is a boolean, the two origins are an array, and 007 stays text because turning it into 7 would change it:

JSON
{
  "server": {
    "port": 8080,
    "ssl": {
      "enabled": true
    }
  },
  "app": {
    "cors": {
      "origins": [
        "https://example.com",
        "https://admin.example.com"
      ]
    }
  },
  "build": {
    "number": "007"
  }
}

The conversion runs in your browser, so configuration with passwords is not uploaded. See the Privacy Policy.

Convert application.properties to JSON

To convert application.properties to json for a Spring Boot or other Java project, paste the file and keep the defaults. Keys with [0] and [1] indexes become arrays, which is how Spring reads a list. A value such as health,info stays one string, because a comma in a properties file does not always mean a list.

If you need the file as YAML instead, Properties to YAML does that. To go from JSON back to a flat file, use JSON to Properties.

Escapes, comments and long lines

Java properties have their own escapes. A \u00e9 becomes the real character é, \n becomes a line break inside the string, an escaped colon or equals sign becomes the plain character, and a line that ends in a backslash is joined with the next one, with the leading spaces of the next line removed.

Lines that start with # or ! are comments. JSON has no comments, so they are dropped, and the notes say so. Duplicate keys are not an error in Java: the last one wins, and the tool does the same and lists each repeat with its line number.

Nested objects or flat keys

Nested objects are the right choice for configuration that a program reads as a tree. Choose Flat keys when you only want the file as JSON, for example to load it in a script or an i18n tool. Each line then becomes one entry in a single object, so server.port stays a key named server.port.

Flat output never has clashes, because no key is split. Nested output can, and that is the next part.

When keys clash

A properties file can hold both db.url=x and db.url.timeout=30. In a tree, db.url cannot be a value and a group of keys at once. The tool keeps the line that came first, leaves the other out, and lists it with both line numbers under Conflicts and repeats. The same goes for a key that is used as a list and as an object.

A list with a gap, such as items[0] and items[2], is written in index order with no hole, and the notes mention it.

Numbers are detected only when they are plain and exact: 8080 and 2.5 become numbers, while 007, 1e5 and numbers with more than 15 digits stay text. Choose Keep everything as text if you want strings throughout. To work with the result further, YAML to JSON and Sort JSON Keys are next to this tool.

Frequently Asked Questions

Technical Q&A for Properties to JSON

Common questions about edge cases, character encoding, and privacy guarantees.

Paste the file into the left box and the JSON appears on the right. Press Copy, or Download to save config.json.

Paste the file and keep the defaults. Dotted keys become nested objects, and keys such as origins[0] become an array.

Each dot starts a new level, so server.port becomes a server object with a port inside. Choose Flat keys to keep server.port as one key instead.

By default 8080 becomes a number and true becomes a boolean. Values such as 007 stay text, and you can choose Keep everything as text for strings throughout.

They are dropped, because JSON has no comments. The notes tell you when a file had any.

The last value wins, as it does when Java loads the file, and the repeat is listed with its line number.

Yes. An escape such as \u00e9 becomes the character é. Line breaks written as \n become line breaks inside the string.

It clashed with another key, such as db.url used as a value and as a group. The Conflicts list names the line, and Flat keys avoids the clash.

No. The conversion runs in your browser and nothing is sent to a server.