← All Tools

C Struct Padding & Memory Layout Visualizer

Paste a C struct and see exactly how the compiler lays it out in memory — per-field offsets, natural alignment rules, the padding bytes silently inserted between and after fields, sizeof, and a byte-level grid. Switch between 32-bit and 64-bit (LP64) targets, apply #pragma pack, and see a reordered layout that minimizes padding. Everything runs locally; nothing is compiled or uploaded.

Struct definition

Paste a C struct above to see its memory layout.