ย่อและตรวจสอบ JSON ในเบราว์เซอร์ของคุณ และดูว่าประหยัดได้กี่ไบต์
วิธีใช้ JSON Minifier
วาง JSON ของคุณ
ถูกตรวจสอบและย่อโดยอัตโนมัติ
คัดลอกเอาต์พุตที่ย่อและตรวจสอบการประหยัดไบต์
A JSON minifier validates your JSON and strips out every unnecessary character, the spaces, indentation and line breaks that make JSON readable, then reports how many bytes and what percentage you saved.
Minified JSON is identical in meaning to the formatted version; only the cosmetic whitespace is gone. That makes it the right form for production: API responses, config bundled into an app, or any payload where transfer size and parse time matter.
It runs in your browser using the native JSON engine, so the output is exactly what your own code would produce. Because it parses first, a successful minify also confirms your JSON is valid; invalid input returns a precise error instead.
One subtle effect is number normalization, which is part of the JSON standard rather than this tool: 1.50 becomes 1.5 and 1e3 may be rewritten, because those represent the same value. Keys, strings, booleans and structure are never changed.
Minification and gzip are complementary, not alternatives. Servers usually gzip responses, which compresses repeated text heavily; minifying first removes whitespace the compressor would otherwise have to handle, and the two together give the smallest transfer.
When you need to read or edit JSON instead of shrink it, the JSON Formatter does the reverse, pretty-printing it with clean indentation. Nothing you paste here is uploaded.
คำถามที่พบบ่อย
ลบช่องว่างและการขึ้นบรรทัดใหม่ที่ไม่จำเป็นทั้งหมด สร้าง JSON ที่ถูกต้องที่เล็กที่สุดพร้อมข้อมูลเดียวกัน ซึ่งโอนได้เร็วกว่า
ไม่ มีแค่การจัดรูปแบบที่ถูกลบ คีย์ ค่า และประเภทถูกเก็บไว้ และตัวเลขถูกปรับให้เป็นมาตรฐานตามมาตรฐาน JSON (เช่น 1.50 กลายเป็น 1.5)
คุณจะเห็นข้อความข้อผิดพลาดของตัวแยกวิเคราะห์เพื่อให้คุณแก้ไข ไม่มีการย่อจนกว่า JSON จะถูกต้อง
ฝังเครื่องมือนี้
เพิ่มเครื่องมือนี้ลงในเว็บไซต์ของคุณเอง คัดลอกสคริปต์ด้านล่าง โดยจะอัปเดตให้เป็นปัจจุบันโดยอัตโนมัติ
<iframe src="https://monu.tools/embed/th/json-minifier" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>เครื่องมือที่เกี่ยวข้อง
จัดรูปแบบ ทำให้สวยงาม และตรวจสอบ JSON ออนไลน์ พร้อมข้อความแสดงข้อผิดพลาดชัดเจนสำหรับข้อมูลที่ไม่ถูกต้อง
แปลง JSON เป็น CSV และ CSV กลับเป็น JSON ได้ทั้งสองทิศทาง เลือกตัวคั่น จัดการฟิลด์ที่มีเครื่องหมายอ้างอิง และคัดลอกผลลัพธ์ ทุกอย่างทำงานในเบราว์เซอร์ของคุณ
แปลง YAML เป็น JSON และ JSON กลับเป็น YAML ได้ทั้งสองทิศทาง ตรวจสอบความถูกต้องขณะแปลงและแสดงข้อผิดพลาดที่ชัดเจน ทุกอย่างทำงานในเบราว์เซอร์ของคุณ
สร้าง TypeScript interfaces จากตัวอย่าง JSON พร้อม nested types, arrays และ optional fields ทำงานในเบราว์เซอร์ของคุณ