JWT デコード
JWTトークンのヘッダーとペイロードを展開して表示。
JWT デコードとは
JWTデコードとは、JSON Web TokenのBase64エンコードされたヘッダーとペイロードを読み取れるJSONに展開する処理です。署名の検証は行いません。
🔒 処理はすべてブラウザ内で完結し、データは送信されません。
このツールの前提
- 処理場所
- このページのブラウザ内(JavaScript / Canvas)
- アップロード
- なし — ファイルは端末の外に出ません
- オフライン
- ページを開いた後は通信不要
Decoding is reading, not verifying
A JWT is three Base64url segments separated by dots: header, payload, signature. This tool decodes the first two and shows them as JSON. It does not check the signature, because doing so requires the issuer's key, which a client-side page cannot be trusted with.
That distinction is the most exploited misunderstanding in web auth. A token whose payload says "role":"admin" is not proof of anything until the signature has been verified against a known key. Services that decode and trust the payload have shipped privilege escalation more than once.
The timestamps are in seconds
exp, iat and nbf are NumericDate values — seconds since the Unix epoch, per RFC 7519. JavaScript's Date.now() returns milliseconds, so a naive comparison marks every fresh token as expired or treats a 1970 token as valid far into the future. Multiply by 1000 before building a Date.
Also check which claims are actually present. exp is optional, and a token without it never expires on its own; aud and iss are what bind a token to a particular service and issuer. A token that decodes cleanly can still be for a different audience, which is a valid signature on the wrong door.
Reading the pieces that look wrong
The segments are Base64url: - and _ instead of + and /, and no = padding. Pasting a standard-Base64 variant into a decoder that expects Base64url produces garbage in the header rather than an error, and the payload often still parses — which makes the corruption easy to miss.
The header's alg field is attacker-controlled data, not a security decision. The classic alg:none attack sets it to none and omits the signature; a verifier that honours the header's own claim about which algorithm to use accepts the forged token. Fix the acceptable algorithms on the server side and reject anything else.
使い方
- 1.JWTを貼り付け
- 2.デコード
- 3.ペイロードを確認
他の方法との比較
同じ変換をする方法は 3 つあります。ブラウザ内(このページ)、サーバー側の変換サービス、デスクトップアプリ。差がつくのは速度ではなく、ファイルがどこへ行くかと、無料でどこまでできるかです。
| 観点 | このツール | サーバー側の変換サービス | デスクトップアプリ |
|---|---|---|---|
| ファイルの処理場所 | このページのブラウザ内 | ベンダーのサーバー(アップロード後) | 自分の PC(アプリをインストール) |
| アカウント | 不要 | 多くの場合必要(無料枠の制限解除に登録を求める) | 不要(ライセンス認証は必要な場合あり) |
| 無料で扱えるサイズ | サイズ制限なし(回数制限もなし) | 数ファイル/時間、または 5〜10MB 程度で課金 wall | ディスクとメモリ次第 |
| 料金 | 無料。Pro は月 $9(大きいファイルと AI 機能のみ) | サブスクが一般的。おおむね月 $7〜15(2026 年 11 月時点) | 買い切り、またはサブスク |
| オフライン | 一度開けば通信不要 | 不可 | 可 |
| 20MB を処理し始めるまで | 待ち時間なし(アップロードが無い) | アップロードが支配的(10Mbps 上りで約 16 秒) | アプリの起動のみ |
| 保証できないこと | 出力は決定的です。他の実装と突き合わせて検証できます | 同じ(変換の原理は変わらない) | 同じ。ただし書式の再現はより忠実な場合がある |
サーバー側のサービスが優れている点は明確にあります。巨大なファイル、チームでの共有、変換履歴の管理、スクリプトからの自動化。逆に「1 回だけ、手元のファイルを別形式にしたい」という今回の用途では、アップロードの待ち時間と登録の手間だけが増えます。
よくある質問
JWTデコードとは?
トークンの内容(ヘッダー・ペイロード)を人間が読める形にすることです。
署名も検証しますか?
いいえ。内容の表示のみで、署名の正当性は検証しません。
トークンは送信されますか?
いいえ、ブラウザ内で展開します。
この変換で失われるもの
エンコードとハッシュは Web Crypto API または純 JavaScript 実装で行います。出力は決定的で、同じ入力からは常に同じ結果になります。他のツールと突き合わせて検証できます。