IV Generator
Random Initialisation Vectors — computed locally in your browser.
Generate an initialisation vector
Value
Bit strength:
Byte length:
How to use the IV Generator
- Choose the initialisation vector length that your cipher expects.
- Pick hex, Base64 or Base64url as the output format.
- Copy the IV and store it with the ciphertext, never inside the key.
Features
- Random initialisation vectors for block ciphers
- Common lengths from 8 to 64 bytes
- Hex, Base64 and Base64url output
- Bit strength shown for the chosen size
Advertisement
Frequently Asked Questions
Common questions about the free online iv generator.
An IV is the random starting block that makes the first encrypted block different each time
the same key is used.
It must match the block size of the cipher, so AES-CBC needs 16 bytes and AES-GCM normally
uses 12 bytes.
No. Reusing an IV with the same key weakens or breaks the encryption, so every message needs
a fresh random IV.
No. The IV can be sent or stored in the clear with the ciphertext, but it must be
unpredictable for CBC mode.
Prefix it to the ciphertext, or store it in a separate field, so the decrypting side can read
it before decryption.
The two terms overlap. An IV is the initial block of a cipher while a nonce is any value used
once in a protocol.
No, and never derive the key from the IV. The IV adds randomness while the key must stay
secret.
Tutorials sometimes use a fixed IV for clarity, but that is unsafe for real data because it
removes the randomness.
Yes. Either side can generate it as long as it is random and unique per message and is
transmitted with the ciphertext.
Last updated: October 10, 2026