bin2hex
Wandeln Sie Binärdaten in Hex-Strings und Hex zurück in Binär auf Byte-Ebene um — wie PHPs bin2hex() und hex2bin().
The `bin2hex` operation — converting raw binary bytes to their hexadecimal string representation — is a fundamental operation in systems programming, cryptography, and network protocol work. It is how you print a byte array in a debugger, how you display a cryptographic hash, and how you serialise binary data for storage in a text field or transmission in a JSON payload.
This tool converts binary data (entered as raw text, where each character is treated as its byte value) to a hex string, and reverses the process to convert a hex string back to binary. It operates at the byte level, making it the right tool for working with file signatures, hash values, binary protocol fields, and any situation where you need to inspect or construct the exact byte-level content of a value.
bin2hex online verwenden
- 1
Hex- oder Binäreingabe einfügen
Fügen Sie einen Hex-String ein, um die binäre Byte-Darstellung zu sehen, oder fügen Sie hex-kodierte Bytes ein, um sie als formatierten Hex-Dump anzuzeigen.
- 2
Daten auf Byte-Ebene prüfen
Jedes Byte wird als zwei Hexadezimalziffern angezeigt. Das Tool warnt automatisch bei ungerader Anzahl von Hex-Zeichen und fügt links eine Null hinzu.
- 3
Ergebnis kopieren
Kopieren Sie die Hex- oder Binärausgabe für Codenutzung, Protokoll-Debugging oder CTF-Challenges.
How bin2hex Conversion Works
At the byte level, bin2hex is straightforward: each input byte is formatted as exactly two hex digits, zero-padded on the left if necessary, and the results are concatenated. The byte value 0 becomes `00`, 10 becomes `0a`, and 255 becomes `ff`. The output length is always exactly twice the input length in bytes — a predictable property that makes hex strings easy to work with programmatically: you can always extract byte N from a hex string by taking characters at positions `2N` and `2N+1`.
The reverse operation (hex-to-binary) splits the hex string into two-character groups, parses each as a base-16 integer, and emits the corresponding byte. Error handling is important: an odd-length hex string, a character outside `0-9a-fA-F`, or a value above `0xFF` in a group all indicate malformed input that must be rejected rather than silently truncated.
Warum FileCrank bin2hex verwenden?
- ✓ Byte-level Hex-Konvertierung entsprechend dem Verhalten von PHPs bin2hex() / hex2bin().
- ✓ Warnt und korrigiert automatisch ungerade Hex-Eingaben.
- ✓ Nützlich für Protokoll-Payloads, kryptographische Ausgaben und CTF-Challenges.
- ✓ Läuft vollständig in Ihrem Browser — keine Daten werden an einen Server gesendet.
Funktionen & Spezifikationen
Häufig gestellte Fragen
Was ist der Unterschied zwischen bin2hex und dem Hex-Konverter?
Der Hex-Konverter wandelt für Menschen lesbare Textstrings in und aus Hex um. bin2hex konvertiert rohe Byte-Daten — binäre Protokoll-Payloads, Datei-Bytes, kryptographische Ausgaben — die möglicherweise keinen gültigen Text bilden. Verwenden Sie bin2hex für Byte-Level-Inspektion.
Was macht PHPs bin2hex()-Funktion und kann ich sie hier replizieren?
PHPs bin2hex() nimmt einen binären String und gibt einen Hexadezimal-String zurück, bei dem jedes Byte als zwei Hex-Ziffern dargestellt wird. Dieses Tool repliziert dieses Verhalten. Der String 'A' (ASCII 65 = 0x41) kodiert zu 41.
Warum erzeugt eine ungerade Anzahl von Hex-Zeichen eine Warnung?
Hex-Kodierung stellt immer vollständige Bytes dar — jedes Byte ist genau zwei Hex-Zeichen. Eine ungerade Zahl bedeutet, dass das erste Byte unvollständig ist. Das Tool füllt links mit einer 0 auf und zeigt eine Warnung an.
Ist dieses Tool für CTF-Challenges nützlich?
Ja. Viele CTF-Challenges beinhalten Hex-Dumps, binäre Payloads und Kodierungsschichten. Dieses Tool verarbeitet Byte-Level-Hex-Konvertierung schnell im Browser ohne lokale Tools.
bin2hex vs. xxd vs. Python binascii
Python's `binascii.hexlify()` and `bytes.hex()` are the idiomatic in-code solution but require a script or REPL. The `xxd` command produces a formatted hex dump with address offsets and ASCII representation in columns — excellent for file inspection but verbose for extracting a single hex value. A browser-based bin2hex tool is the fastest option when you have a short binary string or hash value and need its hex form (or vice versa) right now, without writing code or opening a terminal.
Verwandte Tools
Hex-Konverter
Wandeln Sie Hex-Strings in Text, Dezimal und Binär um — oder kodieren Sie Text in Hex — in Ihrem Browser.
Base64-Encoder / Decoder
Kodieren Sie Text oder Binärdaten als Base64 und dekodieren Sie Base64-Strings zurück in Klartext — sofort im Browser.
ASCII-Konverter
Suchen Sie ASCII-Codes nach Zeichen, Dezimal, Hex, Binär oder Oktal nach — sehen Sie alle Darstellungen auf einmal.
FileCrank bin2hex wandelt zwischen Binärdaten und Hex-Strings auf Byte-Ebene um und repliziert PHPs bin2hex()- und hex2bin()-Funktionen — vollständig im Browser.
Advertisement