Skip to content

Công cụ định dạng & Mã

Trình định dạng JSON5

Trình định dạng JSON5 miễn phí. Chấp nhận JSON với bình luận, dấu phẩy cuối và cú pháp nới lỏng khác, sau đó xuất ra JSON nghiêm ngặt. Hữu ích cho các tệp cấu hình đã sai lệch so với đặc tả.

Runs in your browser
JSON5 formatter & validator
lines: 0chars: 0size: 0 B
JSON5 · UTF-8 · 2-space indent

Ghi chú của biên tập viên

Understanding · JSON for humans.

Chương phân tích chuyên sâu này hiện chỉ có sẵn bằng tiếng Anh. Công cụ chuyển đổi ở trên hoạt động bằng ngôn ngữ của bạn; bài viết giải thích dài chưa được dịch.

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

Quick answers.

What is JSON5?

A superset of JSON that allows comments, trailing commas, unquoted keys and a few other conveniences. It's the format of many config files (tsconfig, devcontainer, babel) and drift-prone hand-edited JSON.

Does it handle single-quoted strings?

This tool handles the most common JSON5 drift — `// comments`, `/* block comments */` and trailing commas. For the full JSON5 spec (unquoted keys, single quotes, hex numbers) paste into a proper JSON5 parser locally.

What does the output look like?

Strict, spec-compliant JSON — 2-space indented. Safe to feed to any JSON.parse or schema validator.

Is it free?

Yes — fully free, in-browser, no signup.

Mọi người cũng tìm kiếm

Công cụ liên quan

More in this room.

Xem tất cả trong Công cụ định dạng & Mã