The invention discloses a compact air filter, comprising a frame body (1), wherein the upper, lower, left and right four side surfaces of the frame body (1) are closed, a filtering layer I (2) and a protecting wire net (4) are mounted on the front side in the frame body (1), and a filtering layer II (3) and a protecting wire net (4) are mounted on the back side in the frame body (1). An air inlet plate (6) is mounted on the left side surface or right side surface of the frame body (1) through a special-shaped insert part (5), and air inlets (7) which can be closed are formed in the middle part of the air inlet plate (6). The compact air filter adopts a structure of one frame with two elements, reduces the mounting interface, increases the filtration area, reduces resistance, improves the filtering quality, prolongs service life, and facilitates integrated application of the device; and simultaneously, by change of the air inlet interface and staged arrangement of the filtering elements to realize two-stage filtration, one structure with two functions is realized, the external dimensions of the air filter are reduced, and the service life of the air filter is prolonged.