What is JSON?
JSON (JavaScript Object Notation) is a lightweight, text-based data format for storing and exchanging structured data as key/value pairs and ordered lists. It is language-independent, easy for humans to read and machines to parse, and is the default format for web APIs and configuration.
A JSON document is built from two structures: objects (unordered key/value pairs in { }) and arrays (ordered lists in [ ]). Values can be strings, numbers, booleans, null, objects or arrays. Keys and strings use double quotes; there are no comments and no trailing commas.
JSON became the lingua franca of web APIs because it maps directly onto data structures in almost every language and parses natively in browsers. It is also widely used for configuration, logging and data storage.
JSON tools
Trình định dạng JSON
Định dạng, kiểm tra và rút gọn JSON trực tuyến. Miễn phí, không cần đăng ký — dữ liệu không rời khỏi trình duyệt của bạn.
Mở công cụTrình chuyển đổi JSON sang YAML
Chuyển đổi JSON sang YAML ngay trong trình duyệt. Theo đặc tả YAML 1.2.
Mở công cụTrình chuyển đổi JSON sang CSV
Chuyển đổi mảng object JSON sang CSV. Có tùy chọn làm phẳng (flatten) theo dot-path cho dữ liệu lồng nhau.
Mở công cụTrình kiểm tra JSON5
Kiểm tra JSON5 với báo lỗi kèm số dòng và cột. Hỗ trợ comment, dấu phẩy cuối, dấu nháy đơn, số hex.
Mở công cụCâu hỏi thường gặp
JSON5 là gì?
JSON5 là một tập mở rộng của JSON với các tính năng bổ sung: comment, dấu phẩy cuối, chuỗi dùng dấu nháy đơn, key không cần dấu ngoặc kép, số hex/Infinity/NaN, và nhiều hơn nữa.
JSON5 có giống JSONC không?
Không — JSONC (kiểu "JSON có comment" của VS Code) chỉ thêm comment. JSON5 còn thêm dấu phẩy cuối, key không cần dấu ngoặc kép, dấu nháy đơn, v.v.
Có công cụ nào liên quan không?
<a class="text-brand-600 hover:underline" href="/json-formatter">JSON Formatter</a> cho JSON chuẩn nghiêm ngặt; <a class="text-brand-600 hover:underline" href="/yaml-formatter">YAML Formatter</a> nếu bạn cần xử lý YAML đầy đủ.