Convert between Base64 and hexadecimal encoding formats. Decode Base64 strings to hex bytes or encode hex to Base64 — with options for uppercase, space-separated bytes, and 0x prefix.
Base64 and hexadecimal are both ways to represent binary data as text. Hex uses 16 characters (0-9, A-F) and produces 2 characters per byte, while Base64 uses 64 characters and produces roughly 1.33 characters per byte — making Base64 about 33% more compact than hex for the same data.
Converting between these formats is common when working with cryptographic hashes (often displayed as hex) that need to be transmitted through APIs or protocols expecting Base64. This tool handles the conversion instantly in your browser.
Hexadecimal (base-16) uses characters 0-9 and A-F, producing 2 characters per byte. Base64 (base-64) uses a 64-character alphabet (A-Z, a-z, 0-9, +, /), producing about 1.33 characters per byte. Base64 is more compact, while hex is more human-readable for byte-level inspection.
Yes. The tool automatically strips spaces, colons, dashes, dots, and the 0x prefix before converting. Paste hex in any common format — the converter handles it all.
Yes. Both Base64 and hex are exact representations of binary data. Converting in either direction preserves the underlying bytes with zero data loss.
Common use cases include inspecting cryptographic hashes received as Base64 in API responses, debugging binary payloads, comparing encoded values across systems that use different formats, and verifying data integrity during format conversions.
Encode or decode Base64 strings directly in your browser
Convert text to Base64 or decode Base64 to plain text
Convert images to Base64 encoded strings
Decode Base64 strings back to viewable images
Encode any file to a Base64 string
Decode any Base64 string back to its original file
Decode Base64 strings to PDF documents
Decode and inspect JWT tokens
Encode or decode URLs with percent-encoding
Convert special characters to HTML entities and back
Convert between hex and Base64 formats
Decode Base64 strings to plain readable text
Check if a string is valid Base64 encoding
Decode Base64 and pretty-print as formatted JSON
Generate Base64 data URIs from text or files
Convert SVG to data URIs for CSS and HTML
Encode text to UTF-8 bytes or decode bytes to text