Tools

Home
JSON FormatterSQL FormatterJS ValidatorMinify CSS
Merge PDFCompress PDFImage to PDF
JPG to PNGPNG to WebPCrop Image

Convert JSON to Properties

Convert JSON objects to Java .properties file format. Flattens nested objects with dot notation. 100% client-side.

Your files never leave your browser
JSON Input0 chars, 0 lines
Properties Output0 chars, 0 lines
Error:
    Ready·

    Drop a nested JSON config and get back flat key=value lines ready for application.properties — dot-notation paths, bracket indexes for arrays, and proper escaping of colons and equals signs all handled automatically. No more tracing three levels deep to type out each path by hand. And everything runs in your browser. Nothing gets uploaded.

    How It Works

    Paste JSON
    →
    Flatten & Escape
    →
    Properties Output

    The parser walks through every key in your JSON tree. When it hits a nested object, it joins the parent key and child key with a dot. Arrays get a numeric index in brackets. Values containing equals signs, colons, or backslashes are escaped so the .properties format reads them correctly. You can sort keys alphabetically with one toggle.

    Examples

    Simple Database Config

    Spring Boot app that reads DB settings from a properties file.

    INPUT
    { "database": { "host": "localhost", "port": 5432, "name": "myapp_db" } }
    OUTPUT
    database.host=localhost database.port=5432 database.name=myapp_db

    Nested App Settings with Arrays

    Config that includes a list of allowed origins for CORS — arrays get bracket indexes.

    INPUT
    { "server": { "port": 8080, "cors": { "origins": [ "http://localhost:3000", "https://myapp.com" ] } } }
    OUTPUT
    server.port=8080 server.cors.origins[0]=http\://localhost\:3000 server.cors.origins[1]=https\://myapp.com

    Multi-Environment Config Merge

    Flatten a big JSON config exported from a cloud dashboard so you can paste it into your local application.properties.

    INPUT
    { "logging": { "level": "INFO", "file": "/var/log/app.log" }, "cache": { "enabled": true, "ttl": 3600 } }
    OUTPUT
    logging.level=INFO logging.file=/var/log/app.log cache.enabled=true cache.ttl=3600

    Who Uses This

    👨‍💻 Java Developers

    Converting JSON configs into application.properties for Spring Boot projects.

    ⚙️ DevOps Engineers

    Translating cloud-exported JSON settings into flat property files for deployment scripts.

    📚 Students

    Learning how dot-notation flattening works by comparing JSON input to properties output side by side.

    🔧 QA Engineers

    Quickly generating test config files from API response samples without writing code.

    Common Mistakes

    Passing an array as the top-level input

    The converter expects a JSON object at the root, not an array. If you have [{"a":1}], wrap it first: {"items":[{"a":1}]}.

    Forgetting that colons in URLs get escaped

    A value like http://example.com becomes http\://example.com in the output. That is correct — Java's Properties.load() handles the unescaping. Don't remove the backslashes manually.

    Pasting JSON with trailing commas

    Some editors allow trailing commas ({"a":1,}) but JSON spec does not. Remove them before converting or you will get a parse error.

    Technical Details

    Frequently Asked Questions

    What is a .properties file?

    It's a plain-text format used mostly in Java for storing configuration as key=value pairs, one per line. Spring Boot, Apache Commons, and most JVM frameworks read this format natively. Think of it as the Java equivalent of a .env file.

    How does this handle nested JSON objects?

    Each level of nesting adds a dot to the key. So {"a":{"b":{"c":1}}} becomes a.b.c=1. There is no depth limit. This matches how Spring Boot resolves hierarchical properties.

    How are arrays converted to properties?

    Array items get a zero-based bracket index. {"tags":["a","b"]} becomes tags[0]=a and tags[1]=b. If the array contains objects, those get further flattened with dots after the index.

    Is my JSON data safe? Does it get uploaded?

    No data leaves your browser. The conversion is pure JavaScript running on your machine. There are no network requests, no analytics on your input, and nothing stored after you close the tab.

    Can I convert properties back to JSON?

    Not with this tool — it goes one direction. For the reverse, check our Properties to JSON converter. That one rebuilds the nested object structure from dot-notation keys.

    Share: