The origin of the multiwavelength emission from the high-synchrotron-peaked BL Lac 1ES 1218+304 is studied using the data from Swift UVOT/XRT , NuSTAR and Fermi-LAT . A detailed temporal and spectral analysis of the data observed during 2008-2020 in the \gamma -ray ( > 100 MeV ) , X-ray ( 0.3-70 keV ) , and optical/UV bands is performed . The \gamma -ray spectrum is hard with a photon index of 1.71 \pm 0.02 above 100 MeV . The Swift UVOT/XRT data show a flux increase in the UV/optical and X-ray bands ; the highest 0.3 - 3 keV X-ray flux was ( 1.13 \pm 0.02 ) \times 10 ^ { -10 } { erg\ > cm ^ { -2 } \ > s ^ { -1 } } . In the 0.3-10 keV range the averaged X-ray photon index is > 2.0 which softens to 2.56 \pm 0.028 in the 3-50 keV band . However , in some periods , the X-ray photon index became extremely hard ( < 1.8 ) , indicating that the peak of the synchrotron component was above 1 keV , and so 1ES 1218+304 behaved like an extreme synchrotron BL Lac . The hardest X-ray photon index of 1ES 1218+304 was 1.60 \pm 0.05 on MJD 58489 . The time-averaged multiwavelength spectral energy distribution is modeled within a one-zone synchrotron self-Compton leptonic model using a broken power-law and power-law with an exponential cutoff electron energy distributions . The data are well explained when the electron energy distribution is E _ { e } ^ { -2.1 } extending up to \gamma _ { br / cut } \simeq ( 1.7 - 4.3 ) \times 10 ^ { 5 } , and the magnetic field is weak ( B \sim 1.5 \times 10 ^ { -2 } G ) . By solving the kinetic equation for electron evolution in the emitting region , the obtained electron energy distributions are discussed considering particle injection , cooling , and escape .