Paste a Java .properties file and see each key's value as the program will read it, escapes decoded and continued lines joined, written out as JSON.
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 does the JSON say "au01"?
Because the next line's opening spaces were thrown away when the two lines were joined. In a .properties file, the space you want has to go before the backslash.
FluffyBench · 3 min read · Reviewed
From .properties to JSON
Join each line that ends in a backslash to the next
→Split each line into a key and a value
→Decode the escapes and write the pairs out as JSON
What it does
Dots don't make groups
A key such as checkout.title is one name with dots in it. The JSON keeps it whole instead of building a checkout group with a title inside.
Empty is a value
checkout.promo= with nothing after the = gives an empty piece of text, not a missing key.
Stray backslashes vanish
A backslash before an ordinary letter is dropped, so \Qui comes out as Qui. Java's documentation describes the same.
Limits A key used twice stops the conversion; the message names the line of the second one.
A French checkout screen, full of \u00e9
An online shop is getting a French version, and the translator has been sent the checkout screen's text as a .properties file, the kind Java programs keep their settings and wording in. Every line pairs a key, the name the program looks up, with a value, the words it shows: checkout.title=Paiement s\u00e9curis\u00e9.
Those \u00e9 marks are the letter é. Java's documentation says one of its ways of loading the file, load(InputStream), reads it as ISO 8859-1, a character set without most of the world's letters, and that characters outside it are written as a backslash, a u and four hexadecimal digits. The file looks broken but isn't. This converter decodes every such escape, so pasted in here, that line's value comes out as "Paiement sécurisé".
The translation tool the shop is moving to only takes JSON, so the file goes through this converter. Most of it reads as it should, but one line doesn't.
One line, written on two
A long value can be split over two lines in a .properties file. A backslash at the very end of a line means "this value carries on below", and the next line can be indented so the file is easier to read. Java's documentation says the backslash, the line break and any spaces at the start of the following line have no effect on the value. They vanish.
That's handy for the indent, and a trap for the space between two words. The error message's first line ends échoué. \, a space and then the backslash, so its two halves meet with one space between them. The help line ends au\ with nothing between, and comes out as "Une question ? Appelez-nous au01 23 45 67 89.":
Where the space goes
The same help line, without and with a space before the backslash. How we checked
The converter isn't adding the mistake. A program that loads the file by Java's rules gets the same "au01"; the JSON shows it to you before a customer can.
Finding the run-together words and fixing them
Paste the translation file into the Properties box.
Go through the JSON for a word stuck to the next one, like au01. On a phone the JSON is under the Result tab.
Back on the Input tab if you are on a phone, type a space just before the backslash that ends that line, in the Properties box.
Press Copy, on the Result tab if you are on a phone.
You've edited the file and want it checked before it goes back
Choose Properties under Language and Normalize under Do. Joined lines show their missing spaces in the file itself, and comments go. It writes é as é, not \u00e9, so keep the escaped file if the program reading it expects escapes.
Your file has [headings] and lines that start with ;