About this tool
Draws the number of random bytes you choose and shows the same bytes in three encodings, so you can paste whichever format a config file or API expects. Base64URL is printed without padding, ready for URLs, cookies and JWT-style tokens. Bytes are generated in your browser and never transmitted.
How to use Random Base64 Generator
- Choose the number of bytes or click a common size.
- Copy the encoding you need: hex, Base64 or Base64URL.
- Click Generate new bytes for a fresh value.
Frequently asked questions
What is the difference between Base64 and Base64URL?
Base64URL replaces + and / with - and _ and drops the = padding, so the value is safe in URLs and filenames.
How many bytes should a token have?
32 bytes (256 bits) is a common choice for API tokens and signing keys; 16 bytes is enough for most unique IDs.