Monu Tools

JWT生成

ペイロードとシークレットからHS256 JSON Web Tokenを生成・署名します。ブラウザ内で完結します。

JWT生成の使い方

  1. 01

    ペイロードをJSONオブジェクトとして編集します。

  2. 02

    HS256シークレットを入力します。

  3. 03

    生成して署名済みトークンをコピーします。

Sign tokens in the browser

A JWT generator that builds and signs JSON Web Tokens from your payload and secret, entirely in your browser using the Web Crypto API. It pairs with the JWT decoder, which inspects an existing token.

How a JWT is put together

A JWT has three parts separated by dots: a header, a payload of claims, and a signature, each Base64url encoded. The signature is what makes the token trustworthy: it proves the payload has not been altered and was issued by someone who holds the secret.

HS256 and your secret

This tool signs with HS256, that is HMAC using SHA-256, the most common symmetric JWT algorithm. The same secret both signs and verifies the token, so it must be kept private on the server.

For HS256, use a long, random secret. A short or guessable secret undermines the whole token, since anyone who guesses it can mint valid tokens of their own.

Encoded, not encrypted

An important point about JWTs: the payload is only encoded, not encrypted. Anyone with the token can read its claims by Base64-decoding them, so never put passwords or sensitive data in a JWT. The signature stops tampering, it does not provide secrecy.

Security note

Because signing happens locally, your secret and payload never leave your device. Even so, avoid pasting real production secrets on a shared or public computer.

よくある質問

どのアルゴリズムが使われますか?

最も一般的な対称JWTアルゴリズムであるHS256(HMAC with SHA-256)を使用し、ブラウザのWeb Crypto APIで署名します。

シークレットはどこかに送信されますか?

いいえ。署名はブラウザ内で完結するため、シークレットとペイロードがデバイスの外に出ることはありません。ただし、共有コンピューターでは本番環境のシークレットを使用しないでください。

トークンのデコードもできますか?

はい。既存トークンのヘッダーとペイロードを確認するにはJWTデコードツールをご利用ください。

出典

このツールを埋め込む

このツールをご自身のウェブサイトに追加できます。下のコードをコピーしてください。内容は自動的に最新の状態に保たれます。

<iframe src="https://monu.tools/embed/ja/jwt-generator" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>

関連ツール