📁 Click or drag a file here
Supports any file type, processed locally in browser
Hexadecimal (hex) is a numeral system widely used in computer science, employing 16 symbols (0-9 and A-F) to represent values. Each hex digit corresponds to exactly 4 binary bits, making it ideal for representing binary data. In programming, hex is commonly used for memory addresses, color values, and byte data.
Decimal uses 10 digits (0-9) and is the numeral system of everyday life. Binary uses only 0 and 1 and is the native language of computers. Hexadecimal bridges the gap: one hex digit equals 4 binary bits, and two hex digits exactly represent one byte (8 bits). This makes hex far more efficient and intuitive than decimal in computing contexts.
• Debugging & Reverse Engineering: Inspect raw bytes of binary files and analyze file formats
• Network Protocol Analysis: Tools like Wireshark display raw packet data in hex
• Color Values: CSS uses hex like #FF6600 for orange-red
• Memory Addresses: Debuggers display memory addresses in hexadecimal
• Hash Values: MD5, SHA and other hashes output hex strings
• UUID/GUID: Unique identifiers are commonly represented in hex
This hex converter is simple yet powerful. Here is a detailed usage guide:
Text to Hex: Enter the text you want to convert in the input box (supports all Unicode including Chinese and Emoji). Choose your preferred separator format (space, colon, comma, newline, or none), and optionally enable the 0x prefix and uppercase options. Click "Text → Hex" to convert. The tool encodes text to UTF-8 byte sequences first, then outputs the hex representation. Character and byte counts are displayed below the input.
Hex to Text: Paste a hex string in the input box. The tool accepts various formats including separators (spaces, colons, commas, newlines) and 0x prefixes. Click "Hex → Text" to decode. If the hex data represents binary file content, the result may appear as garbled text, which is normal.
File to Hex: Click the file area or drag and drop a file onto the page. The tool reads the file's binary content and converts it to a hex string. You can copy the result or download it as a .txt file. Due to client-side processing, we recommend files under 50MB.
Quick Actions: Use the "⇅ Swap" button to exchange input and output. The "↑ To Input" button moves the result back to the input for further conversion. Press Ctrl+Enter as a shortcut to convert.
Hex conversion is widely used in development, security, and data analysis. Here are some typical scenarios:
Reverse Engineering & Protocol Analysis: When analyzing unknown protocols or binary file formats, raw byte data needs to be converted to readable hex format. Hex editors are essential tools for reverse engineers, and this tool can quickly convert small batches of data for analysis. Combined with ASCII viewing, you can quickly identify file magic numbers and text fragments.
Embedded Development & Hardware Debugging: In embedded development, hardware register values are often read via serial or SPI interfaces and represented in hex. This tool helps engineers quickly convert raw hex data into understandable values, or convert configuration data to hex for writing to hardware.
Security Analysis & Vulnerability Research: Security researchers frequently analyze binary files, shellcode, or network packet payloads in raw hex. Hex conversion is fundamental to analyzing malware, constructing exploits, and understanding cryptographic algorithm outputs. This tool supports file-level hex conversion for direct analysis of suspicious files.
Hex Encoding Principles: Hexadecimal is a base-16 numeral system where each digit represents values 0-15. In computing, 4 binary bits (a nibble) can be represented by exactly one hex digit. Thus, one byte (8 bits) is represented by exactly two hex characters. Converting between hex and binary is trivial: each hex digit maps directly to 4 binary bits without any calculation.
History of Hex Notation: The普及 of hex notation in computer science is closely tied to IBM's System/360 mainframe series. In the 1960s, IBM engineers adopted hex to represent binary data more compactly in debugging and logs. Today, hex is a de facto standard in computing, used everywhere from memory addresses to color values, from hashes to UUIDs.
Comparison with Other Encodings: Besides hex, common binary data representations include Base64, Base58, and Base32. Base64 encodes 3 bytes into 4 characters (33% expansion), ideal for data transmission. Base58 removes visually confusing characters and is widely used in Bitcoin addresses. Base32 uses 32 characters and works well in case-insensitive environments. Hex, while doubling the size (100% expansion), offers the best readability and is the preferred choice for debugging and analysis.
Hexadecimal (hex) is a numeral system widely used in computer science, employing 16 symbols (0-9 and A-F) to represent values. Each hex digit corresponds to exactly 4 binary bits, making it ideal for representing binary data. In programming, hex is commonly used for memory addresses, color values, and byte data.
Decimal is the numeral system we use in daily life with 10 digits (0-9). Hexadecimal uses 16 symbols (0-9 and A-F), where each digit represents values 0-15. Hex is more compact: two hex digits represent exactly one byte (0-255), making it far more efficient and intuitive in computing contexts.
The tool supports space, colon, comma, newline, and no-separator formats. It also supports 0x prefix and continuous strings. You can choose the output format that matches your target platform or programming language requirements.
Yes, completely. This tool runs entirely in your browser using JavaScript's FileReader API. No data is ever uploaded to any server. You can safely process sensitive files with full privacy.
Hex encoding converts each byte to 2 hex characters, providing excellent readability but 100% size expansion. Base64 encodes 3 bytes into 4 characters, with only 33% size expansion but poorer readability. Hex is preferred for debugging and inspecting raw bytes; Base64 is better for data transmission and storage.
The tool uses UTF-8 encoding by default, fully supporting Chinese characters, Emoji, and all Unicode characters. Text is first encoded into UTF-8 byte sequences, then converted to hexadecimal representation. Decoding correctly restores the original text.
No, A-F and a-f represent the exact same values. The case difference is purely visual. Uppercase is more common in programming and debugging, while lowercase is prevalent in web development (e.g., CSS color #ff6600). This tool supports both cases and lets you switch.
Since processing is done entirely client-side, file size is limited by your browser's memory. We recommend files up to 50MB. For larger files, consider dedicated hex editors or command-line tools like xxd or hexdump.