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

Updated:

JSON to Properties Converter

Paste JSON and get a .properties file as you type. This json to properties converter flattens nested objects into dotted keys, writes arrays as list[0] keys or comma lists, escapes special characters correctly and points to the line and column of any JSON error. Nothing is uploaded.

Options:

JSON

Input
0 chars · 0 lines

Properties

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

Notes

Null values, empty lists, keys with dots and parsing notes 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 JSON to Properties

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

  1. 01

    Paste your JSON

    Paste the JSON into the left box, press Paste, or open a .json file. Example loads a Spring Boot style config. Spring Boot, Messages and List of objects load smaller samples.

  2. 02

    Read the properties and the notes

    The .properties text appears on the right as you type. The Notes panel lists null values, empty lists, keys that contain dots and big numbers, and a broken JSON input gets the line and column of the problem.

  3. 03

    Choose how arrays, nulls and escapes are written

    Pick index keys such as list[0], dot keys such as list.0 or a comma-separated line for arrays. Decide what a null becomes, add a key prefix, sort the keys, and turn on \uXXXX escapes for non-ASCII text if the file is read as ISO-8859-1.

  4. 04

    Copy or download

    Press Copy to paste the text into your project, or Download to save it as application.properties.

How to convert JSON to properties

A .properties file is a flat list of key=value lines. JSON nests objects inside objects. To convert json to properties, the tool walks the JSON and joins the names on the way down with dots, so server with a port inside it becomes server.port=8080. Strings, numbers and booleans become the value after the equals sign.

Take this JSON:

JSON
{
  "server": { "port": 8080 },
  "app": {
    "cors": { "origins": ["https://example.com", "https://admin.example.com"] },
    "timeout": 2.5
  }
}

It becomes:

properties
server.port=8080
app.cors.origins[0]=https://example.com
app.cors.origins[1]=https://admin.example.com
app.timeout=2.5

Everything runs in your browser and the text is not uploaded. Configuration often holds passwords, so that matters. See the Privacy Policy.

JSON to application.properties for Spring Boot

Spring Boot reads application.properties, and a JSON file is easy to write while a .properties file is what many teams keep in version control. Index arrays, the default here, are the form Spring uses to bind a list, so app.cors.origins[0] and app.cors.origins[1] fill a List in your configuration class.

Current Spring Boot versions read application.properties as UTF-8, so leave the \uXXXX option off and keep real characters. If you go the other way, Properties to JSON rebuilds the nested object, and YAML to Properties does the same job for application.yml.

How arrays are written

  • Index: list[0]=a and list[1]=b. This is the Spring Boot style and the default.
  • Dot index: list.0=a and list.1=b. Some libraries and frameworks read this form.
  • Comma separated: list=a,b on one line, as long as every item is plain text without commas, spaces at the edges or line breaks. Otherwise that list falls back to index keys and the notes say so.

An array of objects always uses keys under the index, so servers[1].host is the host of the second server. An empty array is written as an empty value, such as servers[1].tags=, and is listed in the notes.

Escaping in properties files

A value needs fewer escapes than a key. A backslash is doubled, a line break becomes \n, a tab becomes \t and a leading space is protected. In a key, spaces, equals signs and colons are escaped too, and a key that starts with # or ! is escaped so it is not read as a comment.

This is why the path C:\temp\files comes out as C:\\temp\\files. Java reads the doubled backslash back as one. Characters beyond ASCII, such as the é in Café or an emoji, stay as they are, unless you turn on Escape non-ASCII, which writes each UTF-16 unit as a \uXXXX escape that any Java version can read.

Null values, empty objects and odd keys

A properties file has no null. Choose between an empty value (key=), leaving the key out, or the text null. An empty object or list becomes an empty value. A key that already holds a dot, such as com.example in logging levels, is kept as written, and the notes warn you that Spring reads it as a path.

If a top-level list or a single value is pasted, the keys start with an index or with the word value. Add a key prefix to give them a name. JSON numbers with more than 15 digits are rounded by JSON parsing itself, and the notes flag them so you can check the result.

Comments cannot be kept, because JSON has none. Object keys that are whole numbers are listed first in ascending order, because that is how JavaScript orders them when it parses JSON. A one-item list written as a comma line reads back as a plain string. The tool does not split Spring profiles and does not read YAML. For YAML input use YAML to Properties, and to move JSON into another config format use JSON to YAML.

Frequently Asked Questions

Technical Q&A for JSON to Properties

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

Paste the JSON into the left box and the properties text appears on the right. Press Copy, or Download to save application.properties.

Use the default settings: dotted keys and index arrays such as list[0]. Spring Boot reads that form directly, and the file is UTF-8, so leave the \uXXXX option off.

The names are joined with dots, so a port inside a server object becomes server.port. You can add a prefix in front of every key.

As index keys such as list[0]=a by default, as list.0=a with the dot option, or as one comma separated line. An array of objects always uses keys under the index.

A properties file has no null, so the value is written empty by default. You can skip the key or write the text null instead.

Yes. Backslashes are doubled, line breaks and tabs become \n and \t, and keys escape spaces, equals signs and colons. Non-ASCII text can be written as \uXXXX if you need it.

Yes. Every key then starts with an index such as [0]. Add a key prefix, because Spring Boot cannot bind a list at the root.

Yes, the order of the JSON is kept unless you turn on Sort keys.

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