An apparatus for forming liquid hydrocarbons from solid coal. The coal is pulverized to provide a particulate coal feed, which is then extruded to provide a hollow tube of compressed coal supported inside of a support tube. A clay feed is extruded to provide a hollow tube of compressed clay supported inside of the coal tube and a combustible fuel is burned inside of the clay tube. The temperature of combustion is sufficient to fire the extruded clay and pyrolyze the extruded coal to produce hydrocarbon gases and coal char. The support tube has holes for releasing the hydrocarbon gases, which contain suspended particles formed during combustion. The suspended particles are removed from the hydrocarbon gases to provide clean gases, which are passed through an ionizing chamber to ionize at least a portion thereof. The ionized gases are then passed through a magnetic field to separate them from each other according to their molecular weight. Selected portions of at least some of the separated gases are mixed, and the mixed gases are cooled to provide at least one liquid hydrocarbon product of predetermined composition. Portions of the separated gases may also be mixed with the coal char and other input streams, such as waste plastics, and further treated to provide other hydrocarbon products.