In this Article, a compact Fourier transform ion cyclotron resonance (FTICR) mass spectrometer based on a permanent magnet is presented. This instrument has been developed for real-time analysis of gas emissions. The instrument is well-suited to industrial applications or analysis of toxic and complex samples where the concentrations can vary rapidly on a wide range. The novelty of this instrument is the ability to use either electron ionization (EI) or chemical ionization (CI) individually or both of them alternatively. Also in CI mode, different precursor ions can be used alternatively. Volatile organic compounds (VOCs) from the ppb level to very high concentrations (% level) can be detected by CI or EI. The magnet is composed of three Halbach arrays, and the nominal field achieved is 1.5 T. The ICR cell is a 3 cm side length cubic cell. The mass range is 12-200 u with a broad band detection. The mass accuracy of 0.005 u and the resolving power allow the separation of isobaric ions such as C3H8+ and CO2+. Gas introduction via controlled gas pulses, electron ionization, ion-molecule reactions, ion selection, and detection are all performed in the ICR cell. The potential of the instrument will be illustrated by an analysis of a gas mixture containing trace components at ppm level (VOCs) and components in the 0.5-100% range (N2, alkanes, and CO2).