Where can I find the warp whistle in Mario 3?

Solution 1:

There are 3 Warp Whistles in Super Mario Bros. 3.

The first warp whistle is gotten in stage 1-3 by hopping on the white block, then pressing down for several seconds to drop into the background, then running all the way to the end of the stage. Be aware that you need to hurry as this effect does wear off.

The second warp whistle is in World 1 Fortress. You need the Raccoon Leaf to get this one... At the end of the first area, instead of going through the door, stomp the dry bones then run from the far right side to the edge to build up speed so you can fly. Fly up and to the right. You'll land on a hidden ledge above the wall. Run to the right and then press up to enter a hidden door with a chest with the warp whistle in it. Note: This completes the fortress, but doesn't remove its door on the map.

The third warp whistle is on the World 2 overworld. You need to get a Hammer by defeating one of the Hammer Bros. sets wandering around the map. Once you have it, go near the rock in the upper-right corner of the map and use the Hammer. It will break the block. Behind the block is a wandering Hammer Bros (Fire Bros. specifically). Beat them to get the third whistle.

However, you only need two whistles to get to World 8...

Solution 2:

You're talking about Stage 3 in World 1. Close to the end of that stage, you'll see a white block, like this one:

White block

Holding down on it for 5 seconds will drop you through it, and you'll be in the "background". You can still get hit, though, so be careful!

Once you're in the background, run to the end of the level, and "behind" the black border. It will teleport you into a secret room with a chest that has the Warp Whistle.