F

YAML/Properties 互转YAML/Properties Converter

YAML与Properties配置文件互转Convert between YAML and Properties configuration files.

关于 YAML/Properties 互转About YAML/Properties Converter

Java 项目传统上使用 properties 存放配置,而 Spring Boot 更推荐层级清晰的 YAML。本工具支持 YAML 与 properties 双向互转,自动处理层级键、列表与特殊字符转义,让配置迁移与对照不再手工誊写。Java projects traditionally store configuration in properties, while Spring Boot prefers the clearer YAML. This tool converts between YAML and properties in both directions, handling hierarchical keys, lists and escaping automatically — no more manual transcription.

使用方法How to Use

  1. 粘贴源配置内容。Paste the source configuration.
  2. 选择转换方向:properties → YAML 或 YAML → properties。Choose the direction: properties → YAML or YAML → properties.
  3. 点击转换,在输出区域核对层级结构。Click convert and verify the hierarchy in the output area.
  4. 复制结果到对应配置文件。Copy the result into the corresponding config file.

常见问题FAQ

层级键是如何对应的?How do hierarchical keys map?

properties 的 a.b.c=v 对应 YAML 的 a: 下嵌套 b: 再嵌套 c: v;工具自动完成展开与合并。properties’ a.b.c=v corresponds to YAML’s nested a: > b: > c: v; the tool expands and collapses this automatically.

注释会保留吗?Are comments preserved?

两种格式注释语法不同且位置语义不一,转换以键值结构为准,建议转换后人工补回注释。The two formats differ in comment syntax and placement, so conversion focuses on key-value structure; re-add comments by hand afterwards.

中文和特殊字符会出错吗?Will Chinese or special characters break?

工具按各自格式规范进行转义与还原(如 properties 的 Unicode 转义、YAML 的引号规则),保证转换前后内容一致。The tool escapes and unescapes per each format’s rules (properties Unicode escapes, YAML quoting), keeping content identical across the conversion.