That's a good question! It really depends on the place. Some very traditional or famous onsens may have signs saying "no tattoos" but I think it's slowly becoming more accepted. Especially as a foreigner! I've never seen those signs before, nor have I been cautioned about my tattoo. But my flower❀ tattoo isn't very big. You might be able to hide yours with a small towel if the onsen has secluded areas or opaque water. If you're going with Japanese friends, you could always ask them! They might know :)
Is it true that people with tattoos aren't allowed in onsen?