Java Properties and JSON converter
Decode Java .properties escapes and continuations, or export a string-valued JSON map as an ASCII properties file.
- 1Add input
- 2Adjust settings
- 3Get your result
Tool input and files are processed in this browser without being uploaded.
Before you start
Move localization messages and Java configuration between .properties and JSON. Java escape rules are applied locally; export uses Unicode escapes so the result can be loaded from an ASCII-compatible byte stream.
How to use this tool
- Choose Properties to JSON or JSON to Properties, then paste content or open a UTF-8 file.
- Review Unicode escapes, line continuations and key separators. Fix duplicate decoded keys; use a flat string map for JSON input.
- Inspect the keys and values. Copy or download the full result, and test the configuration in its receiving application.
Supported inputs and limits
One UTF-8 input or file, at most 1 MiB and 50,000 physical lines. Selected files take precedence over pasted text. For legacy Latin-1 files, first convert the text encoding to UTF-8. The page previews 200 entries; the download is complete.
Uses Java Properties.load(Reader) rules: =, : or unescaped whitespace separate key and value; odd trailing backslashes continue a line. Unicode escapes use exactly four hex digits after one u. Unknown escapes drop the backslash, as Java does.
Duplicate decoded keys are rejected instead of retaining the last occurrence. JSON must be a flat object containing only string values. Empty keys and empty values are supported; comments, original spacing and ordering guarantees are not transferred.
JSON to Properties emits ASCII with Unicode escapes, including surrogate pairs. It does not expand Spring placeholders, run code, load XML properties, or configure an application. Check the exported settings before use.
Worked example
Example input
hello=\u4f60\u597d fruits=apple, \ banana cheeses
Example options
{"direction": "to-json"}Example output
{
"hello": "你好",
"fruits": "apple, banana",
"cheeses": ""
}When something does not work
Check the selected direction and fix malformed \uXXXX escapes or duplicate decoded keys. JSON values must all be strings. Remove a selected file to process pasted text.
Frequently asked questions
How are continued lines joined?
An odd number of trailing backslashes removes the line break and the leading space, tab or form feed on the next line. It does not insert a space; a space before the backslash remains.
Are Windows paths treated literally?
Java properties use backslash escapes. Write a literal backslash as \\. Unknown escapes remove the backslash, so an unescaped Windows path can change meaning.
Can Java load the exported file as bytes?
Yes, the output uses ASCII characters and Java Unicode escapes. It is suitable for Properties.load(InputStream); keep the original when migrating comments or application-specific behavior.
Documentation & further reading
Related tools
JSON formatting workspace
Format or minify strict JSON, sort object keys, and encode or decode strings while preserving raw number tokens.
Regex tester
Try a pattern and see what it matches in your text.
Compare text
See what changed, side by side.
HTML formatter
Format HTML indentation so its structure is easier to read.