Minify JSON for Production — Smaller Payloads, Faster APIs

July 4, 2026 · 3 min read

I noticed our API responses were 40% larger than they needed to be because every JSON response was pretty-printed with 4-space indentation. Fine for development, wasteful in production. I ran the response template through Formly's JSON minifier and confirmed the file size dropped from 85KB to 52KB. For an endpoint called 10,000 times a day, that is 330MB of saved bandwidth daily.

Minify in Production, Beautify in Development

Pretty-printed JSON during development. Minified JSON in production. That is the pattern. Minify your JSON for production →

Sam Taylor Written by Sam Taylor — Full-Stack Developer. I build tools that solve real problems. Formly is one of them. More about me →