Thermocouples are electrical components that consist of two wires joined at the end with welded junctions. A thermocouple has wires that are made with two different types of metal. The junction of these wires generates a small electrical voltage. This voltage will vary with the temperature that the junction is exposed to. Gas fireplaces use this effect by placing a thermocouple over the pilot flame. The thermocouple junction must be hot for the gas valve to open. This prevents the gas to come out of the fireplace gas nozzles when there is no pilot flame, which could result in filling a room with natural gas.
Inspect your gas logs and the location of the thermocouple in the flame. It's important when you replace the thermocouple to position the thermocouple in the same place so that its temperature will be correct with the flame on.
Turn off the gas to the fireplace. This will turn off the pilot flame. Check to make sure it goes out. Wait a half-hour for the thermocouple to cool.
Use a hex nut driver to loosen the two nuts for the two thermocouple wires. Some systems use screws, in which case simply use a screwdriver to loosen the screws.
Remove the thermocouple by pulling it out with needle nose pliers. This will ensure that your fingers won't get burned. Place the thermocouple on bricks so it won't burn anything, although it should be cool at this point.
Take a clean cloth and dampen it with isopropyl alcohol. Clean the nut or screw terminals from which you removed the thermocouple in the fireplace. Also clean the wires on your thermocouple replacement.
Secure the two wires from your new thermocouple to the two nut or screw terminals near the pilot flame nozzle. Tighten the nuts or screws.
Turn on the gas to the fireplace and relight the pilot flame. Wait 15 minutes for your thermocouple to get heated, then turn on the fire to check your installation.