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.

Step 1

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.

-
Paste AES key/IV values from backend logs or config files.
-
Upload `.txt` files containing encoded ciphertext from CLI tools.
-
Use sample data to verify format compatibility before production troubleshooting.

Example: HEX Key to Base64

Input a 128-bit AES key in HEX:

00112233445566778899aabbccddeeff

Expected Base64 output:

ABEiM0RVZneImaq7zN3u/w==
Step 2

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.

-
Auto Detect: best for quick checks when you are unsure of source format.
-
HEX to Base64: use for API body payload conversion.
-
Base64 to HEX: use for debugging with low-level cryptography libraries.

Example: Base64 Ciphertext to HEX

Paste Base64 input from an API response:

q4qEt5Y3QjQh8Cw3Yqxy+3cr0QfAblm8XJt51YvM8Pw=

Output as HEX (truncated):

ab8a84b79637423421f02c3762ac72fb772bd107c06e59bc5c9b79d58bccf0fc...
Step 3

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
Step 4

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.

-
Copy output directly to clipboard for quick API payload testing.
-
Download output as a `.txt` file to share with backend teams.
-
Re-convert output in reverse mode to verify exact byte preservation.

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.