Random Base64 Generator
Generate a random Base64-encoded string of any byte length, useful for tokens, API keys, and test data.
Recommended Settings
Pro Tips
- •Base64 encoding turns raw random bytes into a compact, URL-safe-ish text representation - the output text is longer than the raw byte count
- •This is the same technique used by the site's OpenSSL Password Generator, just exposed as its own dedicated tool
- •Base64 output can include +, /, and = characters, which aren't safe to use directly in URLs without additional encoding
- •Increase the byte length for use cases needing more entropy, like session tokens or API keys
Most Popular
Most users generate 16-32 byte values for tokens and placeholder API keys
When to Use This Tool
Generate a random Base64 string to use as a placeholder token or key during development.
Create random Base64 values for testing encoding, decoding, or storage logic.
Fill in realistic-looking encoded values while building or testing an application.
Demonstrate how Base64 encoding represents binary data as text.
How It Works
Generate the requested number of random bytes using the Web Crypto API
Encode those bytes into a Base64 text string
Display the result and update it live as you adjust the length
100% Private
Files never leave your device. All processing happens locally in your browser.
Lightning Fast
Powered by Web Crypto API (crypto.getRandomValues) with Base64 encoding for optimal performance on modern browsers.
Open Source
Built with verified, open-source libraries. Fully transparent.
Frequently Asked Questions
How long can the result be?
The underlying random data ranges from 4 to 128 bytes, which becomes a somewhat longer Base64-encoded text string.
Is this safe to use as a real security token?
The underlying randomness comes from the Web Crypto API, which is cryptographically secure, but always generate real production secrets in a controlled server-side environment rather than a public web tool.
Is my data sent to a server?
No. The value is generated and encoded entirely in your browser.
Can the output include special characters?
Yes, standard Base64 output can include +, /, and = characters. If you need a URL-safe variant, you'll need to replace those characters manually.
What's the difference between this and the OpenSSL Password Generator?
They use the same underlying technique, but this tool is framed as a general-purpose Base64 string generator rather than specifically a password/secret generator.