The thermodynamic definition of the equilibrium constant K (see this advanced level article for derivation) is
where Δr Go is the reaction Gibbs energy at standard conditions (a constant for a particular reaction), R is the gas constant and T is temperature.
It is defined using activities (see this article and this article for details), which are ratios relative to a standard state. Since activities are dimensionless, the equilibrium constant is also dimensionless. However, when equilibrium constants are calculated as a quotient of concentrations or partial pressures, the practice is to quote them in units of concentration or pressure according to the quotient.
For example, the units of Kc for
is mol-4dm12.