Home Tools Blog About

Convert JSON to Properties

In short

Convert JSON to Java .properties with real escaping (RFC-correct keys/values). Bidirectional. Spring-style arrays. Free, offline, client-side.

  • Runs in your browser
  • Nothing uploaded
  • Free, no sign-up

Convert JSON to Java .properties (or back) with real escaping per java.util.Properties: =, :, spaces, backslashes, leading !/# in keys; newlines and leading whitespace in values; optional \uXXXX Unicode escapes. Pick dot-index, Spring-style bracket-index, or comma-joined for arrays.

Enter input to convert.
🛡
100% PrivateNo server uploads, ever
InstantRuns in your browser
💧
No WatermarksClean output, always
🆓
Free ForeverNo accounts, no limits

How to Use Convert JSON to Properties

  1. Pick a mode - Encode (JSON → properties) or Decode (properties → JSON). The relevant options become visible automatically.
  2. Pick array notation (encode) - Dot-index (items.0=x) is the generic form. Bracket-index (items[0]=x) is what Spring Boot uses for collection binding. Comma-joined (items=x,y,z) only works when the array contains primitives.
  3. Pick null handling - Emit empty value (key=), Skip the line, or Emit the literal string null. Most Java configs treat empty values as "set to empty string"; skip is closer to "unset"; literal is sometimes used in tests.
  4. Toggle Unicode escaping - Java's traditional java.util.Properties#store writes non-ASCII as uXXXX. Modern Spring Boot reads UTF-8 directly, so you usually leave this off. Turn on for legacy compatibility.
  5. Hit Convert - or just type; the 200 ms debounce keeps it responsive. Ctrl+Enter (⌘+Enter on Mac) forces a recompute.
  6. Read the stats - encode shows key count, nesting depth, escape sequence count. Decode shows entry count, parsed comments, depth.
  7. Copy or download - Encode mode saves as output.properties; decode mode saves as output.json. Includes comments preservation when enabled.

Frequently Asked Questions

Are special characters actually escaped?

Yes. In keys: =, :, spaces, tabs, form-feed, backslash, leading ! and #, embedded newlines/carriage returns. In values: backslash, embedded newlines/tabs/form-feed, leading whitespace. {"a:b":"v"} correctly produces a:b=v – readable by any java.util.Properties consumer.

What’s the difference between dot-index and bracket-index for arrays?

Dot-index items.0=a, items.1=b is the generic flattening – works with most config systems that parse dotted keys. Bracket-index items[0]=a, items[1]=b is what Spring Boot uses for @ConfigurationProperties collection binding. Pick whichever your downstream consumer expects.

When should I use Unicode escaping?

Only for Java’s classic Properties.load(InputStream) path, which reads ISO-8859-1 and requires uXXXX for non-ASCII. Spring Boot, Tomcat 8+, and modern Java code that calls Properties.load(Reader) with a UTF-8 reader handle raw UTF-8 fine. Leave off unless you specifically need legacy compatibility.

Can I round-trip JSON → properties → JSON?

Mostly yes – but properties files are typed as strings, so the decoder applies smart coercion: "42"42, "true"true, "null"null. Round-tripping {"a":"42"} through properties and back gives {"a":42} – the original string-ness is lost. For exact round-trips, keep the JSON.

What about comments in .properties files?

The decoder collects all lines starting with # or ! as comments. With “Include parsed comments” enabled, they’re emitted under a __comments__ array key in the output JSON. Without it, comments are dropped but the data is preserved. Encode mode supports a single header comment.

How are null values handled?

JSON’s null doesn’t map cleanly to Java properties (which has no null concept – every key has a string value). Three modes: empty writes key= (most common, treated as empty string in Java), skip omits the line (closer to “unset”), literal writes key=null (so your code sees the four-character string “null”).

Does it support nested arrays and objects?

Yes, arbitrary depth. {"a":{"b":[{"c":1}]}} flattens to a.b.0.c=1 (dot mode) or a.b[0].c=1 (bracket mode). The decoder uses a heuristic: numeric path segments create arrays, others create objects.

What about line-continuation backslashes in input?

The decoder honors Java’s line-continuation rule: a line ending in a single backslash continues onto the next line, with leading whitespace stripped from the continuation. Two backslashes at the end is an escaped backslash, not a continuation.

Is my data uploaded anywhere?

No. All escaping, flattening, parsing, and JSON manipulation runs in your browser. Open DevTools → Network and watch zero requests fire after the page loads. Safe for application config files, secrets, or any sensitive data.

Does it work offline?

Yes. Total bundle is under 20 KB. Once the page loads, disconnect and keep converting – useful when working with config files in air-gapped environments.

Keep going

Related Tools

All Json tools →

Analyze JSON Online and Validate JSON Structure

Analyze JSON Online Validate & Analyze JSON Structure with detailed statistics including depth, key…

Capture JSON Screenshot Generator

Capture JSON Screenshot and Render pretty-printed JSON as a syntax-highlighted PNG screenshot - dark…

Censor JSON And Redactor

Censor JSON and Redact passwords, tokens, and PII in JSON with asterisks, [REDACTED], or…

Base64 to JSON Decoder

Decode Base64 to pretty-printed JSON - URL-safe variant, sort keys, indent 2/4/tab/minified. Free, client-side,…

Convert JSON to Base64

Encode JSON to Base64 or decode back. Standard / URL-safe / no padding. Pretty/minified/sorted.…

Convert JSON to Bson

Real BSON encoding per bsonspec.org - int32/int64/double types, embedded docs, arrays. Bidirectional. Free, offline,…

Convert JSON to Image

Render JSON as a syntax-highlighted PNG/JPEG with 6 themes, custom fonts, line numbers. Free,…

Convert JSON to Text

Convert JSON to plain text - pretty, dot-path, indented tree, YAML-like, or numbered outline.…

Convert JSON to TSV

Convert JSON to TSV with real tab/newline escaping. Nested flattening, header union, bidirectional. Free,…

Convert TSV to JSON

Convert TSV to JSON (and back) with type inference, headers toggle, empty-cell strategy, pretty-print.…

Edit JSON

Edit a JSON value by dot/bracket path, format or minify, indent 2/4 spaces. Live…

Escape JSON

JSON-escape a string for embedding inside another JSON value or code literal - with…

Share

Embed this tool

Add this free tool to your website. Copy and paste the code: