Đị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ệ.
Cách dùng Định dạng JSON
Dán hoặc gõ JSON của bạn vào ô đầu vào.
Nhấn Chạy để phân tích và in lại với thụt lề 2 khoảng trắng.
Sao chép JSON đã định dạng, hoặc đọc lỗi nếu dữ liệu nhập không hợp lệ.
The JSON Formatter and Validator turns minified, escaped or messy JSON into a clean, indented structure you can actually read, and pinpoints syntax errors with their exact location so you can fix them fast.
It runs your input through a strict JSON parser. If parsing succeeds, the tool re-prints the data with a consistent 2-space indent, which means a clean format is also proof that your JSON is valid. If parsing fails, you get a precise error instead of a vague "something is wrong".
Developers reach for it constantly: inspecting an API response, sanity-checking a config file, cleaning up a webhook payload before saving it, or making a large blob diff-friendly before committing it to version control. Readable JSON makes structure, nesting and missing fields obvious at a glance.
Most "invalid JSON" errors come from a handful of causes: keys or strings wrapped in single quotes instead of double quotes, a trailing comma after the last item, comments (which standard JSON does not allow), unquoted keys copied from a JavaScript object, or smart quotes pasted in from a document. The error position tells you exactly where the parser gave up.
Because the whole thing runs in your browser, your JSON never leaves your device. That matters when the payload contains access tokens, customer records or anything you would not want to paste into a random website that quietly uploads it to a server.
Once formatted, copy the result with one click. If you need the opposite, the JSON Minifier strips all whitespace to produce the smallest possible payload for production.
Câu hỏi thường gặp
Nó phân tích JSON của bạn, kiểm tra tính hợp lệ, và in lại với thụt lề 2 khoảng trắng gọn gàng để dễ đọc. Nếu JSON không hợp lệ, nó sẽ trả về thông báo lỗi chính xác.
Không. JSON của bạn được định dạng hoàn toàn trong trình duyệt của bạn, nên không có gì được gửi tới máy chủ. Nó không được lưu trữ, ghi nhật ký hay chia sẻ.
Bộ định dạng tuân theo chuẩn JSON nghiêm ngặt: khóa và chuỗi cần dấu nháy kép, không dấu phẩy thừa và không chú thích. Thông báo lỗi cho biết nơi phân tích thất bại.
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-formatter" 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
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.
Tạo interface TypeScript từ một mẫu JSON, với kiểu lồng nhau, mảng và trường tùy chọn. Chạy trong trình duyệt của bạn.