Introduction: The Kelvin–Helmholtz Instability (KHI) is an interface instability that develops between two fluids or plasmas flowing with a common shear layer. KHI occurs in astrophysical jets, solar atmosphere, solar flows, cometary tails, planetary magnetospheres. Two applications of interest, encompassing both space and fusion applications, drive this study: KHI formation at the outer flanks of the Earth’s magnetosphere and KHI growth from non-uniform laser heating in magnetized direct-drive implosion experiments. Here, we study 2D KHI with or without a magnetic field parallel to the flow. We use both the GAMERA code, which solves the compressible Euler equations, and the STRATOSPEC code, which solves the Navier-Stokes equations under the Boussinesq approximation, coupled with the magnetic field dynamics. GAMERA is a global three-dimensional MHD code with high-order reconstruction in arbitrary nonorthogonal curvilinear coordinates, which is developed for a large range of astrophysical applications. STRATOSPEC is a three-dimensional pseudo-spectral code with an accuracy of infinite order (no numerical diffusion). Magnetized KHI is a canonical case for benchmarking hydrocode simulations with extended MHD options.Methods: An objective is to assess whether or not, and under which conditions, the incompressibility hypothesis allows to describe a dynamic compressible system. For comparing both codes, we reach the inviscid incompressible regime, by decreasing the Mach number in GAMERA, and viscosity and diffusion in STRATOSPEC. Here, we specifically investigate both single-mode and multi-mode initial perturbations, either with or without magnetic field parallel to the flow. The method relies on comparisons of the density fields, 1D profiles of physical quantities averaged along the flow direction, and scale-by-scale spectral densities. We also address the triggering, formation and damping of filamentary structures under varying Mach number or Atwood number, with or without a parallel magnetic field.Results: Comparisons show very satisfactory results between the two codes. The vortices dynamics is well reproduced, along with the breaking or damping of small-scale structures. We end with the extraction of growth rates of magnetized KHI from the compressible regime to the incompressible limit in the linear regime assessing the effects of compressibility under increasing magnetic field.Discussion: The observed differences between the two codes are explained either from diffusion or non-Boussinesq effects.