Blazer low milage

I have a Blazer 2001 with 171.000 miles i can only get 8 1/2 miles per gallon,car runs good.

We’ll need some basic info such as last time the plugs, and air filter were changed, were oil changes done on a regular schedule? Is there a check engine light? How does it do on the emissions test? There are so many options with sensors, injectors and computers it may require a trip to a competent mechanic with the necessary equipment to properly diagnose the situation.

BTW how did you measure that mileage? If it is some sort of gauge, you can bet it is not accurate.

You also need to tell us about your driving pattern.

Is it urban driving, with a lot of stop and go?
Do you “warm it up” before you drive it?
Do you use drive-up windows at banks and fast food joints?
Are the tires inflated properly?
Do you carry excess weight in the vehicle?
How has it been maintained?
Are you sure that the thermostat is working?

i have a 1996 blazer and when i got my oxygen sensor changed that improved my mileage noticeably

Engines love fuel. They run great on rich fuel mixtures. So, until some carbons up, the engine will continue to run great.
Your truck needs new spark plugs and a fresh air filter. The engine control computer has to go into “closed loop” operation where it actively controls the amount of fuel injected based on the engine’s needs (not, wants).
The engine coolant temperature sensor has to detect 160F degrees before the engine computer “gets busy”. So, the engine coolant may not be getting hot enough, or the temp sensor may not be reporting the correct temperature.
As Dragon Fly pointed, the oxygen sensor(s) have to be doing their job.