← Back to Tools & concepts

Hex Editors & Disk Structure Viewers

A hex view is the lowest common representation of stored bytes. Recovery specialists use it alongside interpreted structure views to check what is actually present in a device, image or file instead of relying only on what an operating system reports. A byte value only means something together with its address space: which representation it was read from, in which unit, and from which base offset.

In short
  • Viewing and editing are different capabilities; a “viewer” label or read-only toggle is a program setting, not a guarantee about the device.
  • An offset is comparable only with its representation, unit and base: device sector, image byte, assembled volume or file.
  • Inspecting metadata helps establish the layout; until the mapping is confirmed, conclusions stay provisional.
  • A valid signature or checksum shows a well-formed copy, not the current generation.
  • Experiments go on a disposable copy with exact offsets and bytes recorded; read-only searching still loads failing media.

Raw bytes vs. interpreted structures

A generic hex editor shows bytes and offsets. A disk-oriented editor may additionally open block devices and show sectors and logical or physical drives. A structure viewer goes further by decoding known metadata — for example GPT entries, NTFS records, APFS objects or RAID metadata — into fields that are easier to inspect. Template-driven viewers sit between the two: in 010 Editor, for example, each variable a Binary Template declares is mapped to a set of bytes in the current file, and the manual notes that assigning such a variable writes its value to the file. A decoded field view can therefore be an editing surface, not only a display.

Which address space an offset belongs to

The same bytes can be reached through several representations, and each numbers them from its own start. Two offsets can be compared only after both are expressed in the same unit and from the same base.

Scroll horizontally to see the full table →

Common address spaces in hex and structure work. Which of them a given tool can open, and how it labels them, has to be checked in that tool’s own documentation.
RepresentationOffset counts fromUnitWhat to confirm
Device as exposed to the hostLogical block 0 of the deviceLogical sector (LBA), in the size the device reportsLogical sector size; whether a bridge, enclosure or controller changed what is exposed
Image file of that deviceByte 0 of the imageBytesWhich source and sector size it was taken from; unread areas recorded by the imaging log
Partition or file-system volumeStart of the partition or volumeBytes or file-system blocksThe partition start and block size actually used
Assembled or decrypted volumeStart of the virtual RAID, LVM or plaintext volumeBytes or blocks of that virtual deviceMember order, stripe, data offset or unlock layer; the mapping back to member offsets
File or containerByte 0 of the file, VM disk or archiveBytesHow the container maps its internal offsets to stored blocks, which may not be contiguous

A physical sector is not one more name for an LBA. A drive can report a logical sector size smaller than its physical sector size, and where the drive stores a given LBA internally is not visible in a host hex view at all. GPT illustrates why the unit matters: the UEFI specification places the primary GPT header in LBA 1 and the backup header in the last LBA, counted in logical blocks, so the header sits at byte 512 on a device exposed with 512-byte logical blocks and at byte 4096 on one exposed with 4096-byte blocks.

A conceptual example of two bases: the Linux kernel’s ext4 documentation says the superblock starts 1024 bytes into the file system. If that file system begins at LBA 2048 of a device with 512-byte logical sectors, the same superblock is at byte 1,024 of the volume and at byte 1,049,600 of a whole-device image (2048 × 512 + 1024). Read with the wrong sector size, the same partition entry points somewhere else entirely, which can look like corruption. Partition Table & Filesystem Recovery covers finding a file-system start without trusting the partition table.

What these tools are useful for

  • checking whether expected signatures or metadata exist at a specific offset in a stated address space;
  • comparing primary and backup structures and noting how they differ;
  • verifying partition boundaries and sector-size assumptions;
  • inspecting file headers, fragments and container structures;
  • reading RAID member metadata, offsets and alignment;
  • confirming whether recovered bytes match the structure a higher-level tool claims to have found.

Viewer and editor are not the same capability

Some recovery products expose a read-only or analysis-oriented hex viewer. Others provide a full editor capable of changing sectors or files, and the distinction can follow the edition rather than the interface. The WinHex/X-Ways Forensics manual says X-Ways Forensics opens disks and interpreted image files strictly in view mode, while WinHex can edit disk sectors and wipe entire disks. In 010 Editor a drive opens read-only if the “Open as read-only” toggle is set; the manual describes switching off the Read Only state and using Save to commit changes to the disk, and warns that incorrect drive editing can cause severe data loss.

A read-only mode describes what that program does with the object it opened. It is a setting to verify for the exact product and version, not a property implied by the word “viewer”, and it is not a device-wide write blocker: the operating system and other software keep their own access. The ability to edit is not automatically an advantage during recovery. Writing corrected metadata back to the only source turns an analytical hypothesis into an irreversible change, and some structure-aware utilities offer to do exactly that — the UEFI specification, for example, expects software to restore a corrupt primary GPT from a valid backup and asks it to request confirmation and to report when it modifies the media.

Reading structures while the layout is still open

A valid byte pattern can be interpreted incorrectly if the source is exposed with the wrong sector size, a RAID has not been assembled, encryption has not been resolved, or a VM or snapshot layer is missing. That does not mean hex work waits until every lower layer is settled: reading member metadata, partition tables and volume headers is often how the sector size, member order, offsets or the presence of an encryption layer are established in the first place. What changes is the strength of the conclusion. Until the mapping is confirmed, findings about higher-level content are provisional.

Encrypted data needs particular care. On an encrypted volume or member, file signatures and file-system structures exist only in the decrypted representation; searching the ciphertext for them and finding nothing says nothing about whether the files survive, and a chance match is not a file. See Understanding Storage Layers Before Recovery and Encryption and Ransomware Recovery Tools.

Search, signatures and checksums

Hex tools can search for byte sequences, text, signatures or repeated patterns. That is useful for locating candidate structures, but a signature match alone does not prove that the surrounding file, file system or RAID state is valid. This is the same distinction discussed in Metadata Recovery vs. Raw Recovery.

A structure that passes its own checks is evidence that one copy is well-formed, not that it is the current one. A GPT header carries its own CRC32 and a CRC32 of the partition entry array; an ext4 superblock carries the magic value 0xEF53 and, with metadata checksums, a superblock checksum. Old copies, backup copies and copies on a member that dropped out earlier can pass those checks while describing an earlier state. The ext4 documentation notes that backup superblocks are kept only in some block groups and that the driver works primarily with the copies in block group 0. When copies are compared, first establish that they belong to the same object — disk or file-system identifiers, member identity, metadata format and version — and then which state each represents; the largest counter or latest timestamp is not selected automatically. Storage Metadata Generations and Consistency sets out how to compare them.

Safe use

Prefer read-only inspection of an image or clone. If an editor is used to test a repair hypothesis, apply the change to a disposable working copy and record in the case notes the source representation, address space, unit and base, the exact offsets, the original and new bytes, and the tool and version used. The original source should not become the experiment.

Read-only does not mean no load. A pattern search across a whole device reads every sector it covers, and on a failing drive that workload can cost more than the answer is worth, whatever mode the editor is in. Searching an image instead keeps that load off the source; see What a Disk Image Preserves — and What It Does Not and Imaging Bad Sectors and Unstable HDDs.

For the broader distinction between recovery software capabilities, see Free vs. Paid Recovery Software and the Software catalog.

Technical references: UEFI Specification 2.11, chapter 5: GUID Partition Table (GPT) Disk Layout — header locations in logical blocks, CRC32 fields, primary/backup validation and restore. It defines GPT only, not other partitioning schemes · Linux kernel: ext4 Block Groups and ext4 Super Block — superblock position, backup copies, magic and checksum fields. Checked in the 7.3.0 documentation build in October 2026; it describes ext4 only · 010 Editor manual: Editing Drives and Introduction to Templates and Scripts — read-only toggle, saving to drives, template variables mapped to bytes. Manual v16.0, Windows edition · WinHex/X-Ways Forensics manual — section 1.4, disk access by edition. Version 21.9; other editions and versions may differ.

Related: Understanding Storage Layers Before Recovery · Storage Metadata Generations and Consistency · Partition Table & Filesystem Recovery · Metadata Recovery vs. Raw Recovery · Filesystem Structure and Metadata Recovery Tools · RAID, NAS and SAN Reconstruction Tools