# 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/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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.

### Data pipeline toolkit

Part of the **Data pipeline toolkit** — small, chainable Actors for cleaning, transforming, and generating data inside a larger pipeline:

- [jq Helper – transform JSON with jq](https://apify.com/rl1987/jq-helper) — Run jq programs over inline JSON or a linked Apify dataset.
- [DuckDB Helper – SQL over CSV, JSON, Parquet, Excel, SQLite](https://apify.com/rl1987/duckdb-wrapper) — Run a DuckDB SQL query over remote/local files, push results to a dataset.
- [Regex Helper](https://apify.com/rl1987/regex-helper) — Apply named regular expressions to strings, extract structured matches.
- [URL Wrangler](https://apify.com/rl1987/url-wrangler) — Join, decompose, and rewrite URLs and query params in batch.
- [ZIP Code Helper](https://apify.com/rl1987/zip-code-helper) — Resolves US ZIP codes into city, state, county, and more.
- [Postal Address Normaliser](https://apify.com/rl1987/postal-address-normaliser) — Parses and normalises postal addresses using libpostal.
- [Phone Number Wrangler](https://apify.com/rl1987/phone-number-wrangler) — Validate, format, and parse phone numbers using libphonenumber.
- [UUID Generator](https://apify.com/rl1987/uuid-generator) — Generate bulk UUIDs (v1, v3, v4, v5, v7) on demand.
- [Thumbnail Maker](https://apify.com/rl1987/thumbnail-maker) — Generates thumbnails from image URLs using ImageMagick.
- [Katana Web Crawler (ProjectDiscovery)](https://apify.com/rl1987/pd-katana) — Crawl websites with Katana, stream results as JSONL.
- [ProjectDiscovery Notify](https://apify.com/rl1987/pd-notify) — Stream records to Slack, Discord, Telegram, Email, and more.

### Did you find this useful?

⭐ Rate this actor on Apify! Your feedback helps other users find it and helps us keep improving it.

### 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(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).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": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rl1987/password-generator"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/yetol01kxVUXRfHbS/builds/YM6BlDCtnm9jVPOWe/openapi.json
