Chuyển Properties sang JSON

Cần chuyển đổi ngược không?
JSON to Properties Converter

Đầu vào: Properties

1

Đầu ra: JSON

Nhập dữ liệu Properties để chuyển đổi sang JSON

Dữ liệu đã chuyển đổi sẽ hiển thị ở đây

Cách chuyển Properties sang JSON

  1. Bước 1 – Dán dữ liệu Properties

    • Dán nội dung file .properties vào panel bên trái.
    • Công cụ phân tích cặp key=value và bỏ qua comment bắt đầu bằng # hoặc !.
    • Bạn cũng có thể import file properties từ máy tính.
  2. Bước 2 – Kiểm tra cấu trúc JSON

    • Key dạng chấm (như app.db.host) được dựng lại thành object JSON lồng nhau.
    • Số và boolean (true/false) được nhận diện và ép kiểu đúng.
    • Xác nhận phân cấp phù hợp với cấu trúc cấu hình mong muốn.
  3. Bước 3 – Lấy JSON

    • Sao chép JSON hợp lệ để dùng trong web app hiện đại hoặc dịch vụ Node.js.
    • Tải xuống dưới dạng file .json.
Example: Properties to JSON
# Input Properties
app.name=My App
app.version=1.0

// Output JSON
{
  "app": {
    "name": "My App",
    "version": "1.0"
  }
}

Related tools

Câu hỏi thường gặp

What is Properties format?

Properties files are simple text files used for configuration in Java applications. They contain key-value pairs separated by '=' or ':'.

How are nested objects handled?

Properties files don't support nested objects natively. Nested structures are typically represented using dot notation (e.g., database.host=localhost).

What data types are supported?

The converter automatically detects numbers, booleans (true/false), and keeps strings as-is. Unicode escapes (\uXXXX) are also supported.

How are comments handled?

Lines starting with '#' or '!' are treated as comments and ignored during conversion. Inline comments are not supported.

Can I use multiline values?

Yes. Use a backslash (\) at the end of a line to continue the value on the next line. This is especially useful for long text values.

Is my data secure?

Yes, all data processing happens entirely in your browser. Your data is never sent to any server, ensuring complete privacy and security.

Chuyển Properties sang JSON | JSONSwiss