Online from safest to most dangerous
Gazelle is actually a reseller store, so it's safe. You pay more (about 30%) and get paid less than others, but again, it's safe.
Swappa verifies ESN/Imei numbers before allowing a sale so it's quite safe (be sure to check pics to know what you are getting).
Ebay - So long as you follow guidelines, it's safe, see below for advice.
Glyde - acts as an intermediary like Ebay, since there's no feedback, people simply lie (on both sides of the transaction). Read up on other peoples thoughts before you buy. People like it because it's fast and they facilitate shipping and a safe harbor system but it can be abused.
Advice for Ebay (and to a lesser extent Swappa)
Someone with 32k feedback isn't going to risk Ebay's wrath over a $100 phone. Refuse to buy from stock images, you want to see what you're actually getting. Some will also use a sample photo and a "condition", some peoples idea of "good" or "Grade B" is far from my idea of good or grade b and different from seller to seller. Not to mention I would rather two scratches in a corner than one in the center of the screen. I only buy if the photos are of the item I'm actually getting and show the screen from various angles, on and off. Use a reliable seller, with actual photos and odds are very good that you will have a smooth transaction. I've done this several times and not had a problem, well, I did but that was due to Sprint enacting the F.E.C. after the sale (see below for Sprint F.E.C. info).
Meet at the store, in this case AT&T store, do the exchange there. If the seller is truly dishonest, they will flat refuse to even meet there. Have them check and remove it from their account while at the store before handing over the money, or pay the fee to remove it and pay the seller whatever is left. This way you know the phone is free and clear and you have a witness to the transaction.
For Sprint phones
You need to check that not only is the ESN clear, but also the F.E.C. (Financial Eligibility Check), which is harder to verify and pass. Getting a halo phone (current or former) to clear the F.E.C. can be a hassle. Sometimes it's easier to swap out the mainboard than it is to deal with Sprint, which is why my Sprint S4 has a Verizon mainboard.