Convert ENV to PROPERTIES

Turn ENV files into PROPERTIES. Each value becomes one key=value line with Java escapes, under its path of keys joined with dots and list positions in brackets, such as server.hosts[0], and a top-level list is written under items, such as items[0].name.

Converted in an isolated sandbox on our serversDeleted after 24 hours

Drop ENV files on the dialor turn it to pick what to do

Dotenv settings as a Java properties file.Each value becomes one key=value line, ready for Java code that reads properties.

  1. What you get

    One PROPERTIES file. Every value from the ENV file is written as its own key=value line, with Java escapes applied to the text.

    Each key is the path of keys that leads to the value, joined with dots. List positions go in brackets, such as server.hosts[0].

  2. Lists and empty values

    A top-level list is written under items, so a first entry with a name appears as items[0].name.

    An empty object or an empty list is written as JSON text on its line, so the key is still there.

  3. Going the other way

    To turn a properties file back into KEY=value lines, use PROPERTIES to ENV. The other ENV conversions are listed under every ENV conversion.

ENV and PROPERTIES.What each format is.

The formats

From · ENV

Dotenv

KEY=value lines that hold environment variables for an app.

Extensions
.env
MIME type
text/x-env
Kind
Text and data
To · PROPERTIES

Java Properties

Key and value pairs in the Java properties format.

Extensions
.properties
MIME type
text/x-java-properties
Kind
Text and data

In your code.The same ENV to PROPERTIES conversion through the API, for your app or your agent.

terminal
$ cv convert report.env report.properties
$ cv convert report.env report.properties

Questions.What people ask about ENV to PROPERTIES.

01OF 04

The keys on the path to a value are joined with dots. List positions are written in brackets, as in server.hosts[0].

It is written under items. A field called name in the first entry becomes items[0].name.

It is written as JSON text on its line.

You get one file.

More conversions.Other ways in and out of ENV and PROPERTIES.