JSON フォーマッター
JSON を整形・検証・圧縮し、折りたためるツリーで構造を確認、JSONPath で絞り込みます。壊れた構文は自動修正し、TypeScript インターフェースや Zod スキーマも生成します。
ブラウザ内だけで動作します。入力した内容はどこにもアップロードされません。
キー、$、[0]、配列ワイルドカード [*]、オブジェクトワイルドカード * — 例: $.posts[*].slug。出力とツリーはフィルターに従い、空欄なら文書全体を使います。
{
"id": 42,
"name": "RYUSLOG DEV",
"tags": [
"json",
"typescript"
],
"owner": {
"handle": "r39",
"verified": true
},
"posts": [
{
"slug": "json-format",
"views": 1200
},
{
"slug": "jwt-decode",
"views": 860
}
]
}整形はブラウザ内で実行されます。無効な JSON もどこにも送信されません。
JSON チートシート
クイックリファレンス- JSON.parse(text)
- JSON 文字列を値に変換します。末尾カンマやシングルクォートがあると SyntaxError になります。
- JSON.stringify(value, null, 2)
- 2 スペースのインデントで整形します。3 番目の引数は空白文字列かスペース数です。
- undefined, function
- オブジェクトからは消えますが、配列の中ではシリアライズ時に null になります。
- Date
- toJSON() を経て変換されるため、常に 2026-11-16T05:00:00.000Z のような ISO 8601 文字列になります。
- "{\"a\":1}"
- ログや環境変数にエスケープされた状態で入った JSON は、解析の前に一度アンエスケープします。
- $.posts[*].slug
- パスフィルター用の JSONPath です。$ はルート、.key はオブジェクトのキー、[0] は配列の添字、[*] はすべての要素を表します。
TypeScript の関連文法ガイド
TypeScript のガイドをすべて見るZod infer vs TypeScript Interfaces: Runtime Validation Gaps
An interface validates nothing, z.infer is the output type and not the input, and Zod 4 renamed the error helpers. What each one actually guarantees.
TypeScriptTypeScript Decorators: Standard vs experimentalDecorators
TS1240 appears when a legacy decorator meets the stage 3 transform, and the reverse breaks NestJS DI. How the two signatures differ and which flag each stack needs.
TypeScriptTS2307 and TS2835: Cannot Find Module Under moduleResolution NodeNext
NodeNext models Node's real resolution, so .js belongs in the source import and exports maps decide what exists. Why bundler resolution hides both errors.
TypeScriptTypeScript strict Mode: TS2531, TS7006, and TS18047 Migrations
strict is nine flags at once. Count errors per code, fix them in the order that keeps the build green, and narrow instead of asserting.