Base64 String Generator
Generates a random token from cryptographically secure bytes and encodes it as Base64 — useful as a placeholder value, test fixture, or random identifier. This is a random token, not an encoding of any real data you provide.
What this generator does
Produces a random base64-encoded string of the length you choose, for filling fields that expect encoded data and for testing encoding and decoding paths.
How to use this tool
- Choose a byte length.
- Press generate for a random Base64 token.
- Copy it, or generate again for a new one.
Worked examples
- Format
- c29tZSByYW5kb20gYnl0ZXM=
- Alphabet
- A–Z, a–z, 0–9, plus and slash, padded with =
Common use cases
- Placeholder tokens for testing
- Random fixture data for development
- Generating a short random identifier
How this generator works
Random bytes are drawn and encoded in base 64, and the result is decoded again before it is shown so that what appears is provably valid. Encoding random bytes rather than picking random base-64 characters is the distinction that matters: the two produce visibly similar strings, but only the first decodes to anything, and padding lands where the byte count says it should.
Limitations and good to know
- Standard base 64, not the URL-safe variant — it contains + and /, both of which need escaping in a URL or a filename.
- Base 64 is an encoding, not encryption. It is trivially reversible and hides nothing from anybody.
- Encoding costs a third in size: three bytes become four characters, so this is a poor way to carry large data.