Summarize:

It's best to have the conversation in person, especially if the guy is a friend. This way, you can make sure there's no confusion and address any questions he might have. Make sure you pick a solid time and place to talk.  There is no good time to tell someone you're not interested, as the conversation will always be somewhat sad. However, you  may not want to tell the guy right before a stressful work or school day. You may want to wait for, say, a weekend when he's not busy. Pick a place that does not seem date-like. Going out to breakfast, for example, may feel like a date. Instead, you could tell him you want to talk to him and invite him to a non-romantic public place, like a low-key coffee shop. While face-to-face is usually ideal, in some cases it's not the best idea. If the guy has been aggressively pursuing you and making you uncomfortable, send a text rejection. You can email him or text him you're not interested. This will save you from dealing with a potential outburst on his end. You should only do this if you feel the guy will get hostile. In most cases, it's best to talk face-to-face. It can be nerve-racking to spill your feelings to someone, so spend some time thinking about your words. You can even write down your feelings and then read over your notes to try to figure out how to best phrase your feelings. Try practicing saying your words a few times before meeting up with him. This way, you can deliver the news in a calm, collected fashion. You want to be direct, but not brutal. Make it clear you're not interested in him romantically, but that you still value him. Romantic rejection is always hard, so try to reject him kindly.  Start off with a compliment that does not sound flirtatious. Say something like "I do think you're a really nice person, but..." or "I have fun hanging out with you, but..." Then, quickly let the guy know you're not interested. For example, "But I just don't see you as more than a friend. I'm sorry." You can give a reason if you want, such as "I'm not looking for a relationship right now" or "I think we would want different things out of a relationship." Sometimes, there may be a specific reason you're rejecting someone. However, it's not always best to be brutally honest. If you don't know this person well, they're unlikely to change troublesome behaviors just because you ask them to and it may result in them getting hostile. For example, if you don't want to go on a second date with a guy because he talked too much, this information may not be worth sharing.
Choose a good time and place to talk. Think about texting him if you're worried about a hostile reaction. Plan what you want to say. Be honest and direct. Withhold some information, if necessary.