Properties Unicode Escape Sequences to JSON
Convert .properties files with Unicode escape sequences (\uXXXX) to JSON with properly decoded characters for i18n resource bundles.
Detailed Explanation
Unicode Escapes in Properties Files
Java .properties files use ISO 8859-1 (Latin-1) encoding by default. To represent characters outside this range (CJK, Cyrillic, Arabic, emoji, etc.), they must be escaped using \uXXXX notation where XXXX is the Unicode code point in hexadecimal.
Example: Japanese i18n Resource Bundle
# messages_ja.properties
app.title=\u30c7\u30d9\u30ed\u30c3\u30d1\u30fc\u30c4\u30fc\u30eb\u30dc\u30c3\u30af\u30b9
app.description=\u7121\u6599\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u958b\u767a\u30c4\u30fc\u30eb
greeting.hello=\u3053\u3093\u306b\u3061\u306f
greeting.goodbye=\u3055\u3088\u3046\u306a\u3089
error.not_found=\u30da\u30fc\u30b8\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093
error.server=\u30b5\u30fc\u30d0\u30fc\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f
Decoded JSON Output
The converter automatically decodes all \uXXXX sequences:
{
"app": {
"title": "デベロッパーツールボックス",
"description": "無料のオンライン開発ツール"
},
"greeting": {
"hello": "こんにちは",
"goodbye": "さようなら"
},
"error": {
"notFound": "ページが見つかりません",
"server": "サーバーエラーが発生しました"
}
}
Why This Matters
Modern i18n systems (react-intl, next-intl, i18next) use JSON format for translation files. Converting from the legacy Java .properties format to JSON with proper Unicode decoding is an essential migration step. The tool handles:
- Standard BMP characters (
\u0000to\uFFFF) - Mixed ASCII and Unicode text
- Multiple consecutive escapes
Use Case
Migrating Java internationalization (i18n) resource bundles from .properties format to JSON for use with modern frontend i18n libraries like react-intl, next-intl, or i18next.
Try It — Properties \u2194 JSON Converter
Related Topics
Properties Multi-line Values to JSON
Syntax Features
Properties Special Character Escaping in JSON Conversion
Syntax Features
Convert Spring Boot application.properties to JSON
Spring Boot
Preserving Comments When Converting Properties to JSON
Syntax Features
Nested vs Flat Key Conversion for Properties Files
Conversion Modes