JSON ミニファイ
空白を削除して JSON を圧縮
Shrink JSON before it crosses the wire
Whitespace and indentation are great for humans but pure overhead for the network. Minifying JSON strips them out, often cutting payload size by 30-60%, so API responses, config files, and embedded data load faster without changing any of the actual data your code consumes.
Use the minifier when you need to
Reduce API response size
Strip indentation from JSON before serving it to clients to save bandwidth and reduce time-to-first-byte.
Embed JSON in HTML or strings
Compact JSON before injecting it into a script tag, environment variable, or single-line config value.
Compare actual payload size
Minify both versions of a payload to measure the structural difference without indentation noise.
How to minify JSON quickly
- 1
Paste the formatted JSON into the editor.
- 2
Click Minify to remove all whitespace, indentation, and line breaks.
- 3
Copy the result or download it for use in production payloads.
Keep going
See where the bytes go
Drill into which fields contribute most to payload size before deciding what to trim.
Format minified JSON
Reverse the process when you receive minified output and need to read it.
Validate before minifying
Make sure the input is syntactically valid so the minified output stays parseable.
Diff before and after
Confirm minification only removed whitespace and didn't touch any values.
Common minifier workflows
Send JSON without indentation in production while keeping pretty-printed copies for debugging.
Embed JSON config inside JavaScript bundles or HTML templates without expanding bundle size.
Squeeze a payload under DynamoDB, Redis, or column-size limits without restructuring the data.
関連ツール
よくある質問
不要な空白、インデント、改行をすべて削除します。データ自体は同一で、取り除かれるのは整形用の文字だけです。一般的なJSONではファイルサイズが30〜60%程度小さくなることがあります。
ネットワーク送信前(APIレスポンス、プロダクション用の設定ファイル、保存データなど)にミニファイすると効果的です。ペイロードが小さくなり、転送が速くなって帯域コストも下がります。一方、人が読む必要があるJSONはミニファイしない方がよいです。
インデントやネストの深さによります。2スペースで深くネストしたファイルなら40〜60%縮むことがありますが、短い値のフラットな配列だと10〜15%程度のこともあります。正確な差分はSize Analyzerで確認できます。
変わりません。削除されるのは整形用の空白だけで、キー、値、配列、ネスト構造はそのままです。整形版とミニファイ版は、どちらもJSON.parse()の結果が同一になります。