Hex/Text Cipher Converter
EncodingProcessed locally in your browser using the Web Crypto API. Nothing is sent to any server.
How It Works
This tool converts cipher data between hexadecimal, UTF-8 text, and Uint8Array representations. It auto-detects whether your input is hex or plain text and shows all three formats simultaneously.
Conversion Details
- Text to Hex: Each UTF-8 byte is converted to its two-character hex representation
- Hex to Text: Pairs of hex digits are decoded back to UTF-8 characters
- Uint8Array: Shows the decimal byte values as a JavaScript typed array literal
- Auto-detection: If input looks like valid hex (even length, only 0-9 a-f), it's treated as hex; otherwise as text
- Implementation: Pure TypeScript using
TextEncoder/TextDecoder
When to Use This Tool
- Inspecting the raw bytes of AES-encrypted output
- Converting SHA-256 hash output between formats
- Debugging encoding issues in cryptographic workflows
- Preparing data for Web Crypto API calls that require specific formats
- Verifying that hex-encoded data matches expected text content
Frequently Asked Questions
What is hex encoding?
Hexadecimal encoding represents binary data as base-16 digits (0-9, A-F). Each byte is represented by two hex characters. It's commonly used to display cryptographic output like hashes and encrypted data.
Why convert between hex and text?
Cryptographic output is often displayed as hex strings. Converting between formats helps inspect encrypted data, verify hashes, and debug encoding issues in cipher operations.
What is Uint8Array?
Uint8Array is a JavaScript typed array of 8-bit unsigned integers. It's the native format used by the Web Crypto API for all cryptographic operations.
Privacy Note
This tool runs entirely in your browser. Your input is never uploaded, stored, or sent to any server.
Disclaimer: This tool is provided for educational and informational purposes only. The results do not constitute professional security advice. Use at your own discretion.