Fuel
12 min readHow To Make Diesel Fuel: Heavy-Duty Diesel Guide
Quick answer
How diesel fuel is made: crude oil distillation, hydrocracking, hydrotreating for ULSD, cetane specs, and biodiesel blending. Why DIY fuel fails modern diesel engines and aftertreatment.
- diesel fuel production
- ULSD refining
- biodiesel
- fuel chemistry
- cetane
How To Make Diesel Fuel?
Commercial diesel fuel is produced at petroleum refineries by distilling crude oil to separate the diesel fraction (boiling range 200–350°C), then hydrocracking heavy molecules into lighter diesel-range hydrocarbons, and hydrotreating to remove sulfur below 15 ppm for Ultra-Low Sulfur Diesel (ULSD). The finished product must meet ASTM D975 specifications for cetane number, lubricity, cloud point, and distillation range. You cannot produce legal, engine-safe ULSD in a garage — modern common-rail diesels and SCR aftertreatment systems require precisely refined fuel that home methods cannot replicate.
This guide explains how diesel fuel is actually manufactured, what specifications it must meet, how biodiesel enters the supply chain at licensed facilities, and why pouring homemade or unrefined fuel into a modern heavy-duty truck destroys injectors, pumps, and aftertreatment within hours.
What Diesel Fuel Actually Is
Diesel is a middle distillate petroleum fraction — heavier than gasoline, lighter than motor oil. Its chemistry determines how it burns in a compression-ignition engine.
Hydrocarbon chains — Diesel consists primarily of paraffins (straight-chain alkanes), naphthenes (ring structures), and aromatics. Chain length typically runs C10 to C20. Cetane number — the diesel equivalent of octane — measures how readily the fuel auto-ignites under compression.
Distillation range — Diesel boils between approximately 200°C and 350°C (392°F to 662°F). This range sits between naphtha/gasoline fractions and heavier lubricating oil fractions in crude oil.
Energy density — Diesel delivers roughly 128,000 BTU per gallon compared to gasoline at 114,000 BTU. Higher energy density per gallon is one reason heavy-duty trucks and equipment run on diesel.
Additives at the terminal — Refinery diesel is not the final product. Fuel terminals inject lubricity improvers, cold-flow improvers (winter blend), corrosion inhibitors, and biocides before delivery to truck stops and fleet yards.
| Property | Typical ULSD spec (ASTM D975) | Why it matters |
|---|---|---|
| Sulfur content | ≤ 15 ppm (ULSD) | SCR catalyst and DPF compatibility |
| Cetane number | ≥ 40 (typical 45–52 at pump) | Cold start, combustion noise, emissions |
| Lubricity (HFRR scar) | ≤ 520 microns | High-pressure fuel pump and injector life |
| Cloud point | Varies by climate/season | Cold-weather gelling and operability |
| Distillation T90 | Per grade and season | Combustion completeness, smoke |
Step 1: Crude Oil Distillation at the Refinery
The first step in diesel production separates crude oil into fractions by boiling point in a distillation column.
Crude oil intake — Refineries receive crude oil via pipeline, rail, or tanker. Crude composition varies by source (West Texas Intermediate, Brent, Canadian heavy, etc.) and determines how much diesel each barrel yields.
Atmospheric distillation — Crude is heated to 350–400°C in a furnace and fed into a distillation tower. Lighter fractions (gases, naphtha, kerosene) rise and condense at higher trays. Diesel-range material condenses in the middle section. Heavy residue (vacuum gas oil, residual fuel) collects at the bottom.
Diesel fraction (straight-run diesel) — The initial diesel cut from atmospheric distillation is called straight-run diesel. It contains too much sulfur, insufficient cetane for modern engines, and the wrong distillation curve for year-round operability. It cannot go directly to the pump.
Vacuum distillation — Heavy bottom residue goes to a vacuum distillation unit operating at reduced pressure. This recovers additional gas oil fractions from the residue without thermally cracking the molecules. Vacuum gas oil feeds the hydrocracker.
Before: A fleet owner buys "off-road red diesel" from an unverified source at a farm co-op — sulfur reads 500+ ppm, cloud point is wrong for winter, and three trucks throw DEF quality and DPF regen faults within two weeks. After: The fleet switches to branded ULSD from a major terminal with winter blend for their climate — sulfur at 8 ppm, no aftertreatment faults, and fuel economy returns to baseline.
Step 2: Hydrocracking and Conversion
Most modern refineries convert heavier fractions into additional diesel through hydrocracking.
Hydrocracker function — Vacuum gas oil and other heavy feeds enter a hydrocracker reactor with hydrogen at high temperature (350–400°C) and pressure (100–200 bar). Heavy molecules break into lighter diesel-range paraffins.
Cetane improvement — Hydrocracked diesel is predominantly paraffinic, which raises cetane number. Higher cetane means shorter ignition delay, quieter combustion, and easier cold starts.
Yield optimization — Refineries adjust hydrocracker severity to maximize diesel yield versus naphtha or jet fuel depending on market demand. A refinery configured for maximum diesel output during trucking season produces more ULSD per barrel of crude.
Catalytic cracking (FCC) — Fluid catalytic crackers produce gasoline as the primary product but also generate light cycle oil (LCO), which can be blended into diesel after further treatment. LCO has lower cetane and higher aromatics — it requires careful blending to meet specs.
| Process unit | Feed | Primary output | Role in diesel production |
|---|---|---|---|
| Atmospheric distillation | Crude oil | Straight-run diesel, naphtha, residue | Initial separation |
| Vacuum distillation | Atmospheric residue | Vacuum gas oil | Feed for hydrocracker |
| Hydrocracker | Vacuum gas oil | High-cetane diesel blendstock | Volume and cetane |
| FCC (catalytic cracker) | Vacuum gas oil | Gasoline + light cycle oil | LCO diesel blendstock |
Step 3: Hydrotreating for ULSD
Hydrotreating removes sulfur, nitrogen, and other contaminants that destroy modern aftertreatment systems.
Sulfur removal — Pre-2006 diesel allowed up to 500 ppm sulfur. ULSD mandated 15 ppm maximum for on-road use starting in 2006 (EPA) and 2009 (full compliance). Hydrotreaters react diesel feedstock with hydrogen over a catalyst at 300–380°C, converting organic sulfur compounds to hydrogen sulfide, which is removed.
Why 15 ppm matters — Sulfur poisons SCR catalysts (copper-zeolite and iron-zeolite), damages DPF washcoat, and contaminates DEF dosing systems. Running high-sulfur fuel in a post-2007 truck generates a cascade of aftertreatment fault codes within days.
Nitrogen removal — Hydrotreating also reduces nitrogen compounds that contribute to NOx emissions and deposit formation in combustion chambers.
Aromatic saturation — Some hydrotreaters reduce aromatic content, further improving cetane and reducing exhaust particulate.
Lubricity loss — Hydrotreating removes sulfur-containing compounds that naturally lubricate fuel system components. Refineries and terminals add lubricity improvers (fatty acid derivatives) to meet ASTM D975 HFRR scar diameter limits of 520 microns maximum.
Step 4: Blending, Additives, and ASTM D975 Certification
Finished diesel is a blend of multiple refinery streams plus terminal additives, tested against ASTM D975 before release.
Blend optimization — Refinery planners mix straight-run diesel, hydrocracked diesel, light cycle oil, and kerosene to hit cetane, distillation, cloud point, and sulfur targets for the target market and season.
Winter blending — Cold-flow properties are adjusted with kerosene blending (#1 diesel blend) and cold-flow improver additives that modify wax crystal formation. Cloud point and CFPP (Cold Filter Plugging Point) must match the climate where the fuel will be sold.
Terminal additives — At the fuel terminal, additives are injected inline during truck loading: lubricity improver, corrosion inhibitor, demulsifier, biocide (for water separator health), and cetane improver if needed.
Quality testing — Each batch is tested for sulfur (XRF or UV fluorescence), cetane number (engine or derived), distillation curve (D86), water and sediment, and lubricity before release to the distribution network.
| ASTM D975 test | What it measures | Failure consequence |
|---|---|---|
| Sulfur (D5453) | ppm sulfur content | SCR/DPF poisoning |
| Cetane (D613/D976) | Ignition quality | Hard starting, noise, emissions |
| Distillation (D86) | Boiling range | Smoke, power loss, incomplete burn |
| Lubricity (D6079) | HFRR scar diameter | CP4/HPFP wear, injector damage |
| Water and sediment (D2709) | Contamination | Filter plugging, injector damage |
Biodiesel Production at Licensed Facilities
Biodiesel (B100) is produced separately from petroleum diesel and blended at terminals — not in a home garage.
Feedstock — Commercial biodiesel uses soybean oil, canola oil, used cooking oil, or animal fats. The feedstock is filtered and pre-treated to remove water and free fatty acids.
Transesterification — Oil reacts with methanol (or ethanol) in the presence of a catalyst (sodium or potassium hydroxide) to produce fatty acid methyl esters (FAME) — biodiesel — and glycerin as a byproduct. The reaction runs at 50–60°C in agitated reactors at licensed production facilities.
Washing and drying — Crude biodiesel is washed to remove residual catalyst, methanol, and glycerin, then dried to meet ASTM D6751 water content limits.
Blending at the terminal — Biodiesel blends are designated B5 (5% biodiesel), B11, B20, etc. Most truck stops sell B5 to B11. OEMs publish maximum biodiesel blend percentages — Cummins generally approves B20 for current engines, but check your engine manual.
Cold-weather limitations — Biodiesel gels at higher temperatures than petroleum diesel. Cloud point of B100 can be 35–50°F depending on feedstock. Winter blending reduces biodiesel percentage in cold climates.
Why You Cannot Make Legal Diesel Fuel at Home
Home production methods — whether attempting to refine used motor oil, mix vegetable oil with solvents, or run crude oil through improvised distillation — cannot produce fuel that meets modern engine requirements.
Sulfur — No garage method achieves 15 ppm sulfur. Used motor oil contains zinc, phosphorus, and sulfur additives that poison SCR and DPF systems immediately.
Cetane and distillation — Improvised distillation produces an unpredictable boiling range with low cetane, causing hard starting, white smoke, and combustion knock that damages pistons and rings.
Lubricity — Without proper lubricity additives, homebrew fuel scores above 520 microns HFRR scar diameter. Bosch CP4 and CP4.2 high-pressure fuel pumps on 6.7 Power Stroke and 6.6 Duramax fail within 50–200 miles on unlubricated fuel.
Contamination — Water, sediment, and biological growth in stored homebrew fuel plug fuel filters and score injector plungers. A single gallon of water in a saddle tank can take out an entire fuel system.
Legal issues — Untaxed fuel production without federal and state fuel tax registration is illegal for on-road use. Off-road dyed diesel has the same ULSD sulfur spec but different tax status — using dyed fuel on public roads carries federal penalties.
Aftertreatment destruction timeline — Running non-ULSD or contaminated fuel in a post-2007 truck typically produces fault codes within 1–5 tanks: SPN 3364 (DEF quality), SPN 4364 (SCR efficiency), SPN 3251 (DPF differential pressure), and SPN 5246 (inducement). Use Cummins INSITE or Noregon JPRO to read the full fault stack — our fault code lookup maps these codes to root causes.
Before: Owner-operator buys 200 gallons of "farm diesel" at $2.50/gal from an unlicensed seller — within 10 days the truck derates to 5 mph with SPN 4364, SPN 3364, and SPN 5246 stacked. SCR catalyst replacement quote: $4,800. After: Same operator buys branded ULSD at a major truck stop at $3.85/gal, replaces fuel filters, runs two tanks of clean fuel, and aftertreatment codes clear after a forced regen — total cost: $770 in fuel plus $45 in filters.
Fuel Quality Diagnostics for Fleet Operators
If you suspect fuel quality problems on a truck already in your fleet, diagnose before replacing aftertreatment components.
Fuel sample test — Pull a sample from the tank drain or fuel filter housing. Send to a fuel testing lab for sulfur, water content, biodiesel percentage, and microbial contamination. Cost is typically $50–$150 per sample.
Filter inspection — Cut open the fuel filter after a no-start or derate event. Black slime indicates microbial growth. Metallic glitter indicates CP4 pump wear from poor lubricity. Gel or wax crystals indicate cold-flow failure.
Scan tool fault pattern — Fuel quality faults stack specific codes: SPN 97 (water in fuel), SPN 3364 (DEF quality — sometimes triggered by fuel contamination affecting combustion), SPN 157 (fuel rail pressure). Read the full active and inactive list with Detroit DDDL or Snap-on NEXIQ before ordering parts.
Tank cleaning — Contaminated saddle tanks need professional cleaning and biocide treatment. Adding clean fuel to a dirty tank re-contaminates the system within one tankful.
Fleet fuel sourcing policy — Buy from branded terminals with chain-of-custody documentation. Avoid unknown discount sources, especially for common-rail engines with CP4 pumps.
Read more fuel system and aftertreatment guides on our blog. Contact us for fleet fuel quality protocols and derate diagnosis support.
FAQ
Can you make diesel fuel at home?
No, not fuel that meets ASTM D975 ULSD specifications. Home distillation cannot achieve 15 ppm sulfur, proper cetane, lubricity, or contamination limits required by modern common-rail engines and SCR aftertreatment systems.
How is diesel fuel made from crude oil?
Crude oil is distilled in a refinery tower to separate the diesel fraction, then hydrocracked to improve yield and cetane, hydrotreated to remove sulfur below 15 ppm, blended with additives at the terminal, and tested against ASTM D975 before distribution.
What is the difference between #1 and #2 diesel?
#1 diesel (kerosene-range) has a lower cloud point and better cold-weather flow properties. #2 diesel has higher energy density and is the standard on-road fuel. Winter blends mix #1 and #2 with cold-flow improver additives.
Is biodiesel the same as diesel fuel?
No. Biodiesel is fatty acid methyl esters (FAME) produced from vegetable oils or animal fats. It is blended with petroleum diesel (B5, B11, B20) at terminals. Pure biodiesel (B100) has different cold-flow and storage properties than ULSD.
What sulfur level does modern diesel require?
On-road ULSD must contain 15 ppm sulfur or less per EPA regulations. Pre-2007 engines tolerated up to 500 ppm, but all current heavy-duty trucks and light-duty diesels require ULSD.
Can used motor oil be turned into diesel fuel?
Improvised refining of used motor oil produces fuel with high sulfur, zinc, phosphorus, and heavy metals that destroy SCR catalysts, DPF systems, and high-pressure fuel pumps. It does not meet ASTM D975 and is not legal for on-road use.
What cetane number does diesel need?
ASTM D975 requires a minimum cetane number of 40. Most pump diesel in the US runs 45–52 cetane. Low cetane causes hard starting, increased combustion noise, and higher emissions.
How do you know if bad fuel caused aftertreatment codes?
Pull a fuel sample for lab testing, inspect the fuel filter for slime or metallic debris, and read the full fault stack with a scan tool. Fuel quality codes (SPN 97, stacked SCR efficiency faults after a fuel source change) point to fuel before catalyst replacement.
Where should fleets buy diesel fuel?
Purchase from branded terminals and major truck stop chains with documented fuel quality programs. Avoid unverified discount sources, especially for trucks with common-rail injection and SCR aftertreatment.
What happens if you put gasoline in a diesel tank?
Gasoline detonates under compression instead of igniting smoothly, causing catastrophic injector and pump damage. Do not start the engine. Drain the tank, replace fuel filters, and flush the fuel system before attempting to start.
Fault codes covered in this guide
- All Brands Guide MIL-Type — Malfunction Indicator Lamp (MIL)
- All Brands Guide DPF-DOC — DPF Inlet Face / Diesel Oxidation Catalyst
- Heavy-Duty SPN 4360 FMI 2 — Exhaust Temperature Sensor
- All Brands Guide SCR-PIDs — SCR Aftertreatment System
- Heavy-Duty SPN 157 FMI 0 — Fuel Rail Pressure
- Heavy-Duty SPN 3251 FMI 16 — DPF Differential Pressure