Toolivaro

無料のJSON ミニファイアー

JSON を最小の有効な形に圧縮します。空白をすべて取り除き、削減できたバイト数を表示して、コピー・ダウンロードできます。

JSON ミニファイアーは、データを正確に保持したまま、意味のない空白を 1 バイト残らず取り除き、JSON ドキュメントを最小の有効な表現に縮小します。整形済みの JSON を貼り付けると、入力・出力・削減量をバイト数とパーセントで表示します。設定ファイル、API ペイロード、保存領域のデータを削ろうとしているときに重要な数字です。結果は解析と再シリアライズで生成されるため、ミニファイ後の出力は有効で、入力と意味的に同一であることが保証されます。同じデータ、同じキー順、同じ数値です。コピーとダウンロードの操作で、結果をコードやファイルにすぐ取り込めます。すべてブラウザ内のローカルで処理されるため、貼り付けた JSON がデバイスの外に出ることはなく、ログにも記録されず、送信もされません。漏れてはいけないトークンや設定の扱いに不可欠です。設定をコミットする前、埋め込みペイロードを縮めるとき、API やストレージの容量制限がバイト単位で数えられるときにご利用ください。

ブラウザ内でローカル処理されます

すべてブラウザ内で処理され、貼り付けたJSONが外部に送信・記録・保存されることはありません。

この計算機の使い方

What minification does — and what it does not touch

Minification removes every byte of whitespace between JSON tokens: the indentation, the line breaks, the padding after colons and commas that a formatter added. Whitespace outside string values is insignificant in JSON, so removing it changes nothing about the data — the same values, the same keys, the same order — while making the document as small as the format allows. The tool parses and re-serializes the document rather than editing text, so the output is guaranteed to be valid JSON and semantically identical to the input: the minifier cannot corrupt a document the way a text-based find-and-replace could.

That guarantee is the reason to prefer parse-and-stringify over a clever regex: number representation is preserved, key order is preserved, and the result is always a document the platform can parse again. The savings panel reports input bytes, output bytes, and the percentage saved, so the decision to ship the minified form is made on real numbers.

Where the bytes actually matter

Minification pays off wherever JSON crosses a boundary with a cost: an embedded config in a shipped product (the saving multiplies across every device and every fetch), a payload measured against an API quota, a stored blob billed by size, or a fixture committed to a repository where every byte stays in history. The worked example is typical: a 412-byte pretty-printed config minifies to 301 bytes — 27% smaller, with the same data.

The honest counter-case is also worth knowing: if the input is already compact, re-serialization can add a few bytes (re-escaping a character, for instance), and the tool reports a negative saving rather than hiding it. Minification is a formatting choice with measurable results, and the panel shows the true number in both directions.

The format that travels well

A minified document is still valid JSON, so it can be formatted back to readable indentation at any time — formatting and minifying are exact inverses for valid documents, which is why the JSON formatter and minifier are linked pages. The compact form is also the better base for a second, independent compression step: transport compression (gzip, brotli) works on the bytes after minification, and starting from the smallest valid form means the transport layer has less redundancy to remove.

The two caveats are worth keeping: minification removes whitespace only — it does not rename keys, strip comments (JSON has none), or compress values — and very large documents take a moment to process, so the tool is designed for typical configs and payloads rather than database dumps.

The local promise

Config files and payloads often contain tokens, internal endpoints, and other text that must not leak, and minifying is a job no service needs to see. Everything runs in your browser: the document is parsed and serialized locally, nothing is uploaded, logged, or stored, and copy and download actions deliver the result wherever it is needed.

結果はどうやって計算されるの?

整形済みの設定ファイルを縮小する

整形済みの設定ファイルは 14 行で 412 バイトですが、ミニファイ後の形は 301 バイト。27% の削減です。数千台のデバイスに配布する設定なら、この削減はインストールごと、フェッチごとに積み重なります。ミニファイ後の結果は有効な JSON のままで、JSON フォーマッターでいつでも再度整形できます。

入力と出力の例
入力
json { "retries": 3, "timeoutMs": 5000, "features": { "cache": true } }
結果 412 B → 301 B(−27%)・ 有効な JSON ・ データは同一

計算式と前提は?

ミニファイ方法

minify(json) = JSON.stringify(parse(json))

計算式の記号
記号 意味
parse 標準の JSON パーサー
stringify 空白を含まないシリアライズ

JSON では文字列の外側の空白は意味を持たないため、取り除いてもデータは一切変わりません。

サイズ削減率

savings % = (input bytes − output bytes) / input bytes × 100

計算式の記号
記号 意味
input bytes 入力ドキュメントの UTF-8 サイズ
output bytes ミニファイ後のドキュメントの UTF-8 サイズ

よくある間違いは?

  • そもそも有効でない JSON をミニファイすること。このツールは圧縮前に検証し、問題の正確な内容を報告します。
  • ミニファイすれば必ず縮むと思い込むこと。すでにコンパクトな入力は数バイト増えることがあります。
  • ドキュメントをアップロードするオンラインのミニファイツールを使うこと。このツールはすべてお使いのデバイス上で処理します。

前提と制限は?

  • ミニファイが取り除くのは空白のみで、キー、値、構造はそのまま保持されます。
  • 非常に大きなドキュメントでは少し時間がかかることがあります。このツールは一般的な設定ファイルやペイロード向けです。
  • 出力はコンパクトなシリアライズです。結果への gzip 風の圧縮は別の手順になります。

数値の出典は?

最終確認 2026年8月4日 · バージョン 1.0.0 · Toolivaro 外部コンテンツを保証するものではありません。

よくある質問

ミニファイするとデータは変わりますか?

いいえ。ミニファイアーはドキュメントを解析して再シリアライズするため、値、キー順、数値表現はすべて正確に保持されます。JSON ではトークン間の空白は意味を持たないため、取り除いてもロスはありません。

ミニファイ後の出力が大きくなることがあるのはなぜですか?

入力がすでにコンパクトな場合、再シリアライズで数バイト増えることがあります(たとえば文字の再エスケープなど)。そのような入力では削減率がマイナスになることがあり、このツールは隠さず本当の数値を表示します。

ミニファイした JSON は整形に戻せますか?

はい。ミニファイ後の形も有効な JSON なので、JSON フォーマッターでいつでも読みやすいインデントを復元できます。有効なドキュメントにとって、整形とミニファイは正確に逆の操作です。

Does the minifier remove comments?

JSON has no comments — a document containing them is not valid JSON and is rejected with the parser’s error. Files like tsconfig or package.json use JSONC or JSON5 variants that allow comments; those are outside the JSON standard this tool follows.

Why is the savings percentage negative sometimes?

When the input is already compact, re-serialization can add a few bytes — for example re-escaping a character or normalizing a number’s formatting. The tool reports the true change rather than a floor of zero.

このコレクションの一部 開発者向けテキスト・JSONツールキット

間違いを見つけましたか? 報告する — すべての修正を確認します.

このツールは役に立ちましたか?

Toolivaro編集チームが当社の方法論に基づいてレビュー済み 計算方法 · 編集方針