Paste a Java .properties file to have it checked line by line, and see each key beside the value the check read for it.
FluffyShieldProtected workspace
Loading the tool…
The tool didn't load. Reload the page, or check whether an extension or network filter blocks .
Free · No upload · No sign-up · No usage quotas
Why is the key "upload.max", not "upload.max size"?
In a .properties file a key ends at its first space, and the check lets the line through. The table under the verdict is where you'd spot it.
FluffyBench · 3 min read · Reviewed
Checking a .properties file
Join continued lines and skip the comments
→Split every line into a key and a value
→Stop at a key used twice or a broken escape
What it does
Capitals count
Report.time and report.time are two different keys, so a file with both passes.
[database] is a key
A heading copied from an INI file isn't an error. It's read as a key called [database] with an empty value.
No comments after a value
Only a line that starts with # or ! is a comment. After db.user=stock, a note becomes part of the value: "stock # main account".
Limits A \u escape needs exactly four hexadecimal digits. With three, the check stops: "A properties Unicode escape needs four hexadecimal digits."
A stock app's settings, edited by hand
The small warehouse's stock app reads its settings from application.properties, a plain text file with one setting per line: a key, the name the app looks up, then an = and the value. Two changes were made by hand this morning: the daily stock report should now arrive at 08:00, and uploaded photos may be up to 20MB.
Before restarting the app, you paste the file in here. It stops on line 6 with "Duplicate key "report.time" would overwrite a value. Rename or remove one entry."
A key set twice
The new report time was typed on a fresh line, and the old report.time=07:30 is still above it. Java's documentation says nothing about which of two values for one key wins, and the validator won't guess: it stops at the second one so you can delete whichever is wrong.
With the old line gone, the check passes: "Valid properties", four entries, and a table underneath with each key on one line and its value below it.
What the table under the verdict shows
The table is where the second change shows up. The new line reads upload.max size=20MB, and the table lists it as the key upload.max with the value size=20MB. In a .properties file a key ends at the first =, the first colon or the first space, whichever comes first, so the space after max ended the key there:
Split at a space
The key stops at the first space, so the = ends up inside the value. How we checked
The validator has no list of the keys the stock app looks for, so it can't tell you that the app will now find no key called upload.max size. If you meant one key with a space in it, write upload.max\ size=20MB; a backslash before the space keeps it in the key. If the app's documentation spells it with a dot, write the dot.
Finding the repeated key, then reading the table
Paste the settings file into the Properties box.
Delete the older of the two report.time lines, the one before the line the message under the box names.
Open the Result tab on a phone, or look at the right-hand box on a computer, and read the table key by key.