AES Hex Base64 Converter
Convert AES key, IV, nonce, and ciphertext values between HEX and Base64 formats.
Loading AES Hex/Base64 Converter...
How to Use AES Hex/Base64 Converter
Convert values in real time for AES key, IV, nonce, or ciphertext interoperability.
Paste HEX or Base64 Input
Enter HEX or Base64 text directly in the left panel. This is useful when you need to move AES keys, IVs, nonce values, or ciphertext between systems that expect different encodings. If you are sharing binary key material through APIs, review RFC 4648 Base64 and hexadecimal representation and AES standard guidance.
Example: HEX Key to Base64
Input a 128-bit AES key in HEX:
00112233445566778899aabbccddeeff
Expected Base64 output:
ABEiM0RVZneImaq7zN3u/w==
Choose Conversion Direction
Use auto-detect or force a specific conversion direction. Auto detect tries HEX first and then Base64. For cryptography payload validation, forced conversion is safer because it removes ambiguity. If you are handling browser cryptography data, see Web Crypto API guidance and Base64 decode behavior.
Example: Base64 Ciphertext to HEX
Paste Base64 input from an API response:
q4qEt5Y3QjQh8Cw3Yqxy+3cr0QfAblm8XJt51YvM8Pw=
Output as HEX (truncated):
ab8a84b79637423421f02c3762ac72fb772bd107c06e59bc5c9b79d58bccf0fc...
Normalize Input and HEX Case
Enable whitespace cleanup when your payload has line breaks from terminals or PEM-like formatting. You can also enforce lowercase/uppercase HEX output to match library conventions. For CLI interoperability, compare outputs with OpenSSL enc behavior. For secure key handling while moving data across systems, review OWASP Cryptographic Storage recommendations.
Example: Multiline Base64 Cleanup
Input with spaces/newlines:
ABEiM0RV ZneImaq7zN3u/w==
After cleanup and conversion to HEX:
00112233445566778899aabbccddeeff
Validate and Export
Use converted output in APIs, app configs, or crypto tooling. Keep the original byte sequence unchanged because only encoding should change. A reliable validation method is round-trip testing: HEX to Base64, then Base64 back to HEX, and compare values byte-for-byte. This aligns with RFC 4648 and Web Crypto interoperability practices.
Frequently Asked Questions
Does HEX to Base64 conversion change my AES key?
No. Conversion only changes the text representation. The underlying bytes are identical.
Why does conversion fail for some inputs?
Common causes are odd-length HEX strings, invalid Base64 characters, or accidental whitespace. Use the whitespace cleanup option when pasting multiline payloads. You can compare expected character sets using RFC 4648.
Should AES keys be uppercase or lowercase HEX?
Both are valid. HEX is case-insensitive, but keep formatting consistent across systems to avoid parsing bugs in older integrations.
Can I use this for IV and nonce values too?
Yes. This page is suitable for AES keys, IVs, nonce values, and ciphertext payload conversions used in modes like CBC, CTR, and GCM.
What is the best way to validate cryptographic encoding?
Convert forward and backward (HEX to Base64, then Base64 back to HEX) and confirm you get the exact same value.
Is this tool suitable for production troubleshooting?
Yes. It is useful for integration debugging, API payload checks, and interoperability between OpenSSL, backend services, and browser crypto code using the Web Crypto API.
Related Tools
AES Encryption
AES encryptor online - Encrypt text, JSON, and files with AES-128 or AES-256. Support for CBC, GCM, and CTR cipher modes. Military-grade encryption with automatic key generation.
AES Decryption
AES decryptor online - Decrypt AES-encrypted data with AES-128 or AES-256. Support for CBC, GCM, and CTR modes. Restore your encrypted files securely.
AES Key & IV Generator
Generate secure AES-128 or AES-256 encryption keys and initialization vectors (IV) in hex or Base64 format.
AES-GCM Encrypt/Decrypt
Encrypt and decrypt data specifically in AES-GCM mode with AES-128 or AES-256 and Base64 ciphertext output.
AES-CBC Encrypt/Decrypt
Encrypt and decrypt data specifically in AES-CBC mode with AES-128 or AES-256 and Base64 ciphertext output.
AES-CTR Encrypt/Decrypt
Encrypt and decrypt data specifically in AES-CTR mode with AES-128 or AES-256 and Base64 ciphertext output.