Chuyển JSON sang TOML và TOML trở lại JSON, theo cả hai chiều, hoàn toàn trong trình duyệt của bạn.
Cách dùng JSON / TOML
Chọn một chiều: JSON sang TOML hoặc TOML sang JSON.
Dán JSON hoặc TOML của bạn.
Sao chép kết quả, hoặc hoán đổi để chuyển lại.
This is a two-way converter between JSON and TOML. Pick a direction, paste your data, and copy the result. It is built on a well-tested TOML parser that handles nested tables and arrays of tables correctly.
Everything runs locally in your browser, so your data, which for config files can include hostnames or tokens, never leaves your device.
TOML (Tom's Obvious, Minimal Language) is a configuration format designed to be obvious to read and to map cleanly onto a hash table. It is what Rust's Cargo uses for Cargo.toml and what Python projects use for pyproject.toml, among many others.
JSON and TOML describe similar data but suit different jobs. JSON is the lingua franca for APIs and machine exchange. TOML is built for human-written config, with sections, comments and first-class dates that make a settings file pleasant to edit.
TOML also supports native date and time values and typed numbers, so values keep their meaning rather than all becoming strings, which is part of why it is preferred for configuration.
Most data round-trips cleanly, but there is one catch. TOML has no null value. JSON nulls cannot be represented, so remove or replace them before converting to TOML, otherwise the conversion cannot express them.
Câu hỏi thường gặp
TOML là một định dạng cấu hình tối giản được thiết kế để dễ đọc, được dùng bởi các công cụ như Cargo và nhiều dự án Python trong pyproject.toml.
Hầu hết dữ liệu thì có. TOML không có null, nên các null trong JSON không thể biểu diễn được; hãy loại bỏ hoặc thay thế chúng trước khi chuyển đổi.
Không. Việc chuyển đổi chạy hoàn toàn trong trình duyệt của bạn, nên dữ liệu của bạn không bao giờ rời khỏi thiết bị.
Nhúng công cụ này
Thêm công cụ này vào trang web của riêng bạn. Sao chép đoạn mã bên dưới; nó tự động cập nhật.
<iframe src="https://monu.tools/embed/vi/json-toml-converter" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>Công cụ liên quan
Định dạng, làm đẹp và kiểm tra JSON trực tuyến với thông báo lỗi rõ ràng cho dữ liệu nhập không hợp lệ.
Thu gọn và kiểm tra hợp lệ JSON trong trình duyệt của bạn, và xem bạn tiết kiệm được bao nhiêu byte.
Chuyển JSON sang CSV và CSV trở lại JSON, theo cả hai chiều. Chọn dấu phân tách, xử lý các trường có dấu ngoặc kép, và sao chép kết quả. Mọi thứ chạy trong trình duyệt của bạn.
Chuyển YAML sang JSON và JSON trở lại YAML, theo cả hai chiều. Kiểm tra hợp lệ khi chuyển và hiển thị lỗi rõ ràng. Mọi thứ chạy trong trình duyệt của bạn.