# Secure Password & Passphrase Generator (`rl1987/password-generator`) Actor

Generate cryptographically secure passwords and diceware passphrases following NIST SP 800-63B guidance, with entropy reporting.

- **URL**: https://apify.com/rl1987/password-generator.md
- **Developed by:** [R.L.](https://apify.com/rl1987) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Secure Password & Passphrase Generator

Generate **cryptographically secure passwords** and **memorable diceware passphrases** that follow modern [NIST SP 800-63B](https://pages.nist.gov/800-63-4/sp800-63b.html) guidance — with **entropy reported in bits** for every result. Every secret is produced with Python's `secrets` CSPRNG (never the unsafe `random` module), so the output is suitable for real-world credential generation. Run it on demand, on a schedule, or via the Apify API and integrations.

### What does Secure Password & Passphrase Generator do?

This Actor creates strong, ready-to-use credentials in two modes:

- **Random characters** — classic passwords mixing lowercase, uppercase, digits, and symbols, with optional exclusion of ambiguous characters (`l`, `1`, `O`, `0`, …).
- **Passphrase (diceware)** — memorable word-based passphrases built from the full **EFF large wordlist** (7,776 words, ~12.9 bits of entropy per word), with optional capitalization, custom separators, and an appended digit.

Each generated item includes its **measured entropy in bits** and a plain-language **strength rating**, so you know exactly how strong each credential is.

### Why use this Actor?

- **Security-first**: uses a cryptographically secure random number generator and a Fisher–Yates shuffle. No predictable PRNGs.
- **NIST-aligned**: prioritizes length over forced complexity, supports lengths up to 256 characters, and reports entropy instead of relying on opaque "strength meters."
- **Batch generation**: create up to 1,000 credentials in a single run.
- **Automatable**: schedule rotations, call it from CI/CD, or integrate with Make, Zapier, and 1,000+ apps via the Apify API.

### How to use Secure Password & Passphrase Generator

1. Click **Try for free** / **Start**.
2. Pick a **mode** — *Random characters* or *Passphrase*.
3. Adjust the options (length, word count, character classes, etc.).
4. Set **count** to how many credentials you want.
5. Run the Actor and read the results from the **Output** tab or download them.

### Input

Configure the run from the **Input** tab or via JSON. All fields are optional and have sensible defaults.

```json
{
  "mode": "passphrase",
  "count": 5,
  "wordCount": 6,
  "separator": "-",
  "capitalize": true,
  "includeNumber": true
}
````

| Field | Type | Description |
|-------|------|-------------|
| `mode` | string | `random` or `passphrase`. Default `random`. |
| `count` | integer | Number of credentials to generate (1–1000). Default `1`. |
| `length` | integer | Character length for random mode (1–256). Default `16`. |
| `useLowercase` / `useUppercase` / `useDigits` / `useSymbols` | boolean | Character classes for random mode. All default `true`. |
| `excludeAmbiguous` | boolean | Exclude easily-confused characters. Default `false`. |
| `wordCount` | integer | Words per passphrase (1–64). Default `5`. |
| `separator` | string | Separator between words. Default `-`. |
| `capitalize` | boolean | Capitalize each word. Default `false`. |
| `includeNumber` | boolean | Append a random digit. Default `false`. |

### Output

Results are stored in the dataset. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

```json
{
  "password": "Buddy-Slightly-Shape-Cycle-Variable-Visor-0",
  "mode": "passphrase",
  "length": 43,
  "entropy_bits": 86.87,
  "strength": "strong",
  "charset_size": 0,
  "word_count": 6
}
```

#### Data table

| Field | Description |
|-------|-------------|
| `password` | The generated password or passphrase. |
| `mode` | `random` or `passphrase`. |
| `length` | Total character length. |
| `entropy_bits` | Shannon entropy in bits (higher is stronger). |
| `strength` | Human-readable rating: very weak → very strong. |
| `charset_size` | Size of the character pool (random mode). |
| `word_count` | Number of words (passphrase mode). |

### Pricing

This Actor uses the **pay-per-event** pricing model and charges a **flat $0.01 per run**, regardless of how many credentials you generate in that run. Generating 1 or 1,000 passwords costs the same single event. Apify platform compute usage for these tiny runs is negligible.

### Tips

- For **online accounts**, aim for 60+ bits of entropy (≈ 4+ passphrase words or a 12+ char random password). For **high-value secrets**, target 100+ bits.
- Passphrases are easier to type and remember than random strings at equivalent strength — great for master passwords.
- Use `excludeAmbiguous` when a password may be read aloud or copied by hand.
- Generate a batch (`count`) once and store the surplus in your password manager.

### Security & disclaimer

Credentials are generated in-memory during the run and written only to your own private dataset. Treat generated secrets as sensitive: download them over a secure channel and delete the run's dataset when you no longer need it. This Actor does not transmit generated passwords anywhere else.

Have a feature request or found an issue? Use the **Issues** tab on the Actor page.

# Actor input Schema

## `mode` (type: `string`):

Choose 'random' for random-character passwords or 'passphrase' for memorable diceware-style word passphrases (EFF large wordlist).

## `count` (type: `integer`):

Number of passwords/passphrases to generate in this run. Billing is a flat fee per run regardless of this value.

## `length` (type: `integer`):

Number of characters for random passwords. NIST recommends 15+ characters. Ignored in passphrase mode.

## `useLowercase` (type: `boolean`):

Include lowercase letters in random passwords.

## `useUppercase` (type: `boolean`):

Include uppercase letters in random passwords.

## `useDigits` (type: `boolean`):

Include digits in random passwords.

## `useSymbols` (type: `boolean`):

Include symbols in random passwords.

## `excludeAmbiguous` (type: `boolean`):

Exclude easily confused characters such as l, I, 1, O, 0 for better readability.

## `wordCount` (type: `integer`):

Number of words in each passphrase. Each word adds ~12.9 bits of entropy. 4 words is reasonable, 6+ is strong. Ignored in random mode.

## `separator` (type: `string`):

Character(s) placed between words in a passphrase.

## `capitalize` (type: `boolean`):

Capitalize the first letter of each word in a passphrase.

## `includeNumber` (type: `boolean`):

Append a random digit to the passphrase for sites that require a number.

## Actor input object example

```json
{
  "mode": "random",
  "count": 1,
  "length": 16,
  "useLowercase": true,
  "useUppercase": true,
  "useDigits": true,
  "useSymbols": true,
  "excludeAmbiguous": false,
  "wordCount": 5,
  "separator": "-",
  "capitalize": false,
  "includeNumber": false
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("rl1987/password-generator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("rl1987/password-generator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call rl1987/password-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=rl1987/password-generator",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Secure Password & Passphrase Generator",
        "description": "Generate cryptographically secure passwords and diceware passphrases following NIST SP 800-63B guidance, with entropy reporting.",
        "version": "1.0",
        "x-build-id": "7HCu40Tc5JcCdSi2O"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/rl1987~password-generator/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-rl1987-password-generator",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/rl1987~password-generator/runs": {
            "post": {
                "operationId": "runs-sync-rl1987-password-generator",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/rl1987~password-generator/run-sync": {
            "post": {
                "operationId": "run-sync-rl1987-password-generator",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "mode": {
                        "title": "Generation mode",
                        "enum": [
                            "random",
                            "passphrase"
                        ],
                        "type": "string",
                        "description": "Choose 'random' for random-character passwords or 'passphrase' for memorable diceware-style word passphrases (EFF large wordlist).",
                        "default": "random"
                    },
                    "count": {
                        "title": "How many to generate",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Number of passwords/passphrases to generate in this run. Billing is a flat fee per run regardless of this value.",
                        "default": 1
                    },
                    "length": {
                        "title": "Password length (random mode)",
                        "minimum": 1,
                        "maximum": 256,
                        "type": "integer",
                        "description": "Number of characters for random passwords. NIST recommends 15+ characters. Ignored in passphrase mode.",
                        "default": 16
                    },
                    "useLowercase": {
                        "title": "Include lowercase (a-z)",
                        "type": "boolean",
                        "description": "Include lowercase letters in random passwords.",
                        "default": true
                    },
                    "useUppercase": {
                        "title": "Include uppercase (A-Z)",
                        "type": "boolean",
                        "description": "Include uppercase letters in random passwords.",
                        "default": true
                    },
                    "useDigits": {
                        "title": "Include digits (0-9)",
                        "type": "boolean",
                        "description": "Include digits in random passwords.",
                        "default": true
                    },
                    "useSymbols": {
                        "title": "Include symbols (!@#$...)",
                        "type": "boolean",
                        "description": "Include symbols in random passwords.",
                        "default": true
                    },
                    "excludeAmbiguous": {
                        "title": "Exclude ambiguous characters",
                        "type": "boolean",
                        "description": "Exclude easily confused characters such as l, I, 1, O, 0 for better readability.",
                        "default": false
                    },
                    "wordCount": {
                        "title": "Number of words (passphrase mode)",
                        "minimum": 1,
                        "maximum": 64,
                        "type": "integer",
                        "description": "Number of words in each passphrase. Each word adds ~12.9 bits of entropy. 4 words is reasonable, 6+ is strong. Ignored in random mode.",
                        "default": 5
                    },
                    "separator": {
                        "title": "Word separator (passphrase mode)",
                        "type": "string",
                        "description": "Character(s) placed between words in a passphrase.",
                        "default": "-"
                    },
                    "capitalize": {
                        "title": "Capitalize words (passphrase mode)",
                        "type": "boolean",
                        "description": "Capitalize the first letter of each word in a passphrase.",
                        "default": false
                    },
                    "includeNumber": {
                        "title": "Append a digit (passphrase mode)",
                        "type": "boolean",
                        "description": "Append a random digit to the passphrase for sites that require a number.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
