xxd
Hex dump and reverse hex-to-binary.
KaliParrotLinuxpassive
pkg: xxd
xxd shows a file in hex and can rebuild binaries from hex — handy in RE, CTFs and crafting payloads.
Syntax
xxd {file} | xxd -r
Example
xxd payload.bin | head
Shows the first lines of a hex dump of the binary.
Options & flags
What each switch does. Toggle them in the builder below to assemble a command.
Command builder
Tick options (and fill any values) to build a ready-to-copy command.
xxd
Usage examples
xxd binary | head
Hex dump the first lines.
xxd -p data | tr -d "\n"
Get a continuous hex string.
Advantages
- Quick hex inspection
- Hex↔binary round-trip
Disadvantages
- Basic vs hex editors
- CLI only
Tags
#hex#binary
Official docs: xxd ↗
Related commands
Frequently asked questions
What is xxd used for?
xxd shows a file in hex and can rebuild binaries from hex — handy in RE, CTFs and crafting payloads.
What is an example xxd command?
A common example is: xxd payload.bin | head — Shows the first lines of a hex dump of the binary.
Is xxd part of Kali Linux?
Yes. xxd ships with Kali Linux (and Parrot OS). If missing, install it with: sudo apt install xxd.
What category of security tool is xxd?
xxd is a Core Linux tool with a passive-risk profile when run against a live target.
Try recon tools live
Run real scans against a domain you control, stage by stage.