DevToolBox

Password Generator

安全なランダムパスワードをブラウザ内で即座に生成します。

8128
強度Strong

How to Use the Password Generator

This free online password generator creates cryptographically secure random passwords directly in your browser. All password generation is performed using the Web Crypto API, which provides a high-quality source of randomness suitable for security-sensitive applications. No data is transmitted to any server, ensuring complete privacy.

Why Use a Random Password Generator?

Weak and reused passwords are among the most common causes of security breaches. A random password generator eliminates human bias and predictability, producing passwords that are resistant to brute-force attacks, dictionary attacks, and social engineering. By using unique randomly generated passwords for each account, you significantly reduce the risk of credential stuffing attacks where compromised credentials from one service are used to access another.

Choosing Password Length and Complexity

The strength of a password depends on its length and the size of the character set used. A longer password with a diverse character set exponentially increases the number of possible combinations an attacker would need to try. For most purposes, a password of 16 or more characters using uppercase letters, lowercase letters, numbers, and symbols provides excellent security. For high-security applications such as encryption keys or master passwords, consider using 32 characters or more. The strength indicator in this tool evaluates your current settings and provides feedback on the estimated password strength, helping you find the right balance between security and usability.

Best Practices for Password Management

Always use a unique password for each account. Store your passwords in a reputable password manager rather than writing them down or saving them in plain text files. Enable two-factor authentication wherever possible for an additional layer of security. Regularly update passwords for critical accounts, and never share passwords via email or messaging platforms.

パスワードジェネレーターの使い方

この無料オンラインパスワードジェネレーターは、ブラウザ内で暗号学的に安全なランダムパスワードを生成します。 Web Crypto APIを使用しており、データがサーバーに送信されることはありません。 スライダーでパスワードの長さ(8~128文字)を調整し、使用する文字種(大文字・小文字・数字・記号)を チェックボックスで選択してください。「生成」ボタンを押すとパスワードが表示され、 「コピー」ボタンでクリップボードにコピーできます。強度インジケーターで現在の設定の安全性を確認できます。

実務での活用例

  • 新規アカウントの初期パスワード -- 32文字・全文字種で生成し、パスワードマネージャに直接保存
  • API シークレット・環境変数 -- 記号を外して64文字で生成すると、シェルのエスケープ問題を避けられる
  • Wi-Fi / 共有パスワード -- 紛らわしい文字を避けたい場合は記号オフ・20文字程度が口頭伝達しやすい

よくある落とし穴と対処 / Common Pitfalls

落とし穴 / Pitfall問題 / Problem対処 / Fix
短くて複雑 > 長くて単純 と思い込む
Believing short-and-complex beats long-and-simple
「P@ss1!」(6文字)は数分で総当たりされる。強度は長さが支配的
Length dominates entropy; a 6-char "complex" password falls in minutes
最低16文字。記号を減らしてでも長くする方が強い
Use 16+ chars; prefer length over symbol variety
パスワードの使い回し
Reusing one password everywhere
1サイトの漏洩が全アカウント侵害に直結(クレデンシャルスタッフィング)
One breach unlocks every account (credential stuffing)
サイトごとに生成し、パスワードマネージャで管理
Generate per-site; store in a password manager
Math.random() で自作生成
Rolling your own with Math.random()
Math.random は予測可能で暗号用途に不適
Math.random is predictable and not cryptographically secure
crypto.getRandomValues / crypto.randomBytes を使う(本ツールも使用)
Use crypto.getRandomValues / randomBytes (as this tool does)
定期変更の強制
Forcing periodic rotation
機械的な変更は「Password2024!」型の弱化を招く(NIST SP 800-63Bも非推奨)
Mandatory rotation breeds weak patterns; NIST 800-63B advises against it
漏洩兆候があった時のみ即変更。普段は長く強いものを維持
Rotate on compromise, not on a calendar
記号が原因のシステムエラー
Symbols breaking legacy systems
一部の古いシステムは ' " < > 等を受け付けない
Some legacy systems reject quotes or angle brackets
記号オフで長さを4文字以上足せば同等の強度を保てる
Drop symbols and add 4+ chars of length instead

言語別コード例 / Code Examples

安全な乱数源を使ったパスワード生成の実装例です。

JavaScript (Web Crypto)

const charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
const arr = new Uint32Array(20);
crypto.getRandomValues(arr);
const password = Array.from(arr, (v) => charset[v % charset.length]).join("");

Python (secrets)

import secrets, string
charset = string.ascii_letters + string.digits + string.punctuation
password = "".join(secrets.choice(charset) for _ in range(20))
# random モジュールは使わない(暗号用途には secrets)

Node.js

const crypto = require("node:crypto");
// URL-safe なトークンなら一行で
const token = crypto.randomBytes(32).toString("base64url");

Shell (openssl)

openssl rand -base64 24   # 24バイト → 32文字のBase64パスワード

設定による出力の違い / Before & After

設定: 12文字・英小文字+数字のみ
→ k3n9x2mq7w4p   (組合せ空間: 36^12 ≈ 4.7×10^18)

設定: 16文字・全文字種(推奨)
→ X7#mK2$pQ9@wN4!z   (組合せ空間: 94^16 ≈ 3.7×10^31)

設定: 32文字・記号なし(APIキー向け)
→ Kx9mP2qW7nR4tY8uB3vC6zA1sD5fG0hJ   (62^32 ≈ 2.3×10^57)

12文字→16文字+全文字種にするだけで、総当たりに必要な試行数は約10兆倍になります。

Why browser-only?

A password is the single most sensitive string you will ever type. If a generator runs server-side, the password exists — even briefly — in someone else's logs, memory, and network path. This tool generates passwords with crypto.getRandomValues() entirely inside your browser: nothing is transmitted, nothing is stored, and the page works even offline once loaded. You can verify this yourself — open DevTools, watch the Network tab, and generate as many passwords as you like. Zero requests.

パスワードは最も機密性の高い文字列です。本ツールは生成・表示・コピーの全てがブラウザ内で完結し、 ネットワーク送信は一切発生しません。DevTools の Network タブで実際に確認できます。

開発をもっと効率的に

PR