不喜欢广告? 无广告 今天

Java 属性文件格式化工具

数据开发人员文本
广告 移除?
Java .properties Format Reference

Java .properties files store configuration as flat key=value pairs. They are widely used by Java SE, Spring Boot, Logback, Hibernate, and ResourceBundle for i18n.

Separators

Keys and values can be separated by =, :, or whitespace. Whitespace around the separator is ignored.

评论

#! are comments. Inline comments after a value are 不是 supported by the spec.

Line Continuations

A line ending with a single backslash \ continues onto the next line. Leading whitespace on the continuation line is stripped.

Escapes

Standard escapes: \n, \t, \r, \f, \\, \=, \:, \ . Unicode escapes use \uXXXX with exactly four hex digits.

No Sections

Unlike INI, .properties has a flat namespace. Hierarchy is conveyed through dotted keys, e.g. spring.datasource.url.

广告 移除?

指导

Java Properties File Formatter

Java 属性文件格式化工具

This tool formats Java .properties files using the same rules the JDK uses to load them. It accepts =, :, or whitespace as a separator, recognises both #! comment styles, and joins backslash continuation lines into clean single-line key/value pairs. Use it on application.properties, logback.properties, ResourceBundle messages_*.properties, or any plain Java config you need to tidy up.

如何使用

  1. Paste your raw .properties content into the input box (or click 尝试一个示例).
  2. Pick a separator style: =, :, or preserve whatever the original line used.
  3. Choose spacing around the separator and a comment style (#, !, or preserve).
  4. Toggle options to sort keys, drop duplicates (keeping the last occurrence), align keys to a common width, trim trailing whitespace, or collapse repeated blank lines.
  5. Copy the formatted output, or download it as a .properties file. The validation panel flags duplicate keys and malformed \uXXXX escapes.

特征

  • Spec-correct parsing – handles =, :, whitespace separators, and backslash line continuations the same way java.util.Properties does.
  • Comment style normalization – convert all comments to #!, or preserve each line’s original prefix.
  • Sort and dedupe – alphabetise keys and drop earlier duplicates so the last occurrence wins (matching JVM load order).
  • Key alignment – pad keys to equal width for visually clean diffs and reviews.
  • Whitespace cleanup – trim trailing whitespace and collapse runs of blank lines.
  • 验证 – warns on duplicate keys and reports invalid \uXXXX unicode escapes.
  • Live updates – output and validation refresh as you type or change options.

常问问题

想要享受无广告的体验吗? 立即无广告

安装我们的扩展

将 IO 工具添加到您最喜欢的浏览器,以便即时访问和更快地搜索

添加 Chrome 扩展程序 添加 边缘延伸 添加 Firefox 扩展 添加 Opera 扩展

记分板已到达!

记分板 是一种有趣的跟踪您游戏的方式,所有数据都存储在您的浏览器中。更多功能即将推出!

广告 移除?
广告 移除?
广告 移除?

新闻角 包含技术亮点

参与其中

帮助我们继续提供有价值的免费工具

给我买杯咖啡
广告 移除?