I made this mistake. I was horribly underpaid at my last job by a similar amount, but I was “comfortable”. Unfortunately, it meant that I wasn’t fully appreciated for what I was really doing, and it ended up biting me in the ass. That’s a significant amount to be underpaid, and you should fix it NOW.
Why is this important? Do you want to be a big fish in a small bond? If the company is underpaying and under appreciating you now, what makes you think they’ll appreciate you more if you can get the type of position you want? If you’re getting offers from other companies just straight up, imagine what you might get if you actively looked? Maybe you can find a company that will give you an important role AND more money. Polish up your resume and start it circulating.
Of course your boss doesn’t want you to leave. You’re doing a ton of work and you’re doing it below market value. You’re making him look good. The question to ask isn’t about how it affects your boss, but how it affects your career. A boss only deserves your loyalty if he’s demonstrated that to you, which means going to bat to help you get a raise if you deserve it, telling his bosses you’re doing an awesome job, and taking steps to help further your career, even if that means you move out from under him. If he’s willing to stifle your career, or already is, he’s a bad supervisor and you shouldn’t feel guilty.
That said, I do highly recommend getting some offers you’re prepared to take IN writing. I’ve seen people do this kind of thing on a verbal offer, end up getting their bluff called, and then the verbal offer falls through. Make sure you know exactly what you want before you walk into the room, know what you’re going to ask for and what the minimum is you’re willing to accept before you walk away. And stick to your guns. Maybe you otherwise like this company and the work you do, so you’ll ask for 40k more, but you’d be willing to take 25k to stay in a place and with people you know. Don’t let them talk you down to 5-10k. And you can figure this out by comparing the offers you have on paper. You will not win a negotiation if you aren’t really willing to walk away.
And for that matter, make sure you can back up your claims about the work you’ve done. Make a list of the projects you’ve done that perhaps some of them know about but not all of them. Maybe they undervalue you just because of ignorance and going in there and showing them all this awesome work will encourage them to pay you more. Or maybe they’ll doubt you, and if you can’t cite the work and tell them who to talk to about these projects, it may just frustrate them.
As others said, don’t mention the other offers unless you’re prepared to take them, and make sure you have them in writing. And don’t mention numbers. It doesn’t matter whether you’re leaving for 5k or 50k, all that matters is that you’re willing to walk unless they’re willing to negotiate. Telling them anything about the offer, other than that it exists, does nothing but weaken your hand. If you have an offer for 30k more and you ask for that, they’ll be pretty confident you’d be willing to take less than 30k because, why would you ask for the same amount unless you prefered to stay where you are, and thus that preference has a price and they can talk you down.