C Struct Layout & Packing Visualizer

Paste a struct, pick a target, and see where every byte goes โ€” padding holes, bitfield allocation, and what reordering the members would save.

C struct definition

Target

In-source #pragma pack(n) / __attribute__((packed, aligned(n))) override the Packing dropdown for that struct.

Summary

Memory layout

Members

OffsetSizeAlignTypeMemberBits

Packed vs unpacked vs optimal