What is a .properties file?
Java Properties File · Code and data · Sun Microsystems · 1996
A .properties file is a simple key-value configuration format from the Java world. Each line is a setting like key=value, widely used for application config and for translations (message bundles).
What is a .properties file used for?
Java properties files are plain text: key=value or key:value per line, with # for comments. They are the standard way Java and Spring applications hold configuration and localised text.
For non-ASCII text, older Java escaped characters as \uXXXX, though modern tools read UTF-8 directly. The files open in any editor.
How to open a .properties file
The .properties format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list. For a step-by-step walkthrough, see how to open a .properties file.
Windows
- IntelliJ IDEA
- Eclipse
- VS Code
macOS
- IntelliJ IDEA
- Eclipse
- VS Code
Linux
- IntelliJ IDEA
- VS Code
- any text editor
How to convert a .properties file
You can convert a .properties file to yaml, json using a conversion tool or the export menu of an app that opens it.
.properties file signature (magic bytes)
Programs recognise a .properties file by the bytes at the start of the file, not by its name. These are the signatures for Properties.
| Hex signature | Offset | Note |
|---|---|---|
| (no fixed signature) | 0 | plain text; no fixed magic bytes |
See the full magic-numbers reference for every format.
Frequently asked questions
What is a .properties file?
A .properties file is a simple key-value configuration format from the Java world. Each line is a setting like key=value, widely used for application config and for translations (message bundles).
How do I open a .properties file?
Any text editor opens it, and Java IDEs like IntelliJ IDEA add syntax help. Each line is a simple key=value pair.
What is a .properties file used for?
Configuration and localisation in Java applications: database settings, feature flags and translated message bundles, one key-value pair per line.
How do I handle special characters in a properties file?
Modern tools read UTF-8 directly. Older Java expected non-ASCII characters escaped as \uXXXX, which you can generate with the native2ascii tool.
Related formats
Sources
Details on this page were checked against authoritative references: