This Park Tool video explains how to do it:
Note that some older Shimano pedals may require the medium-gray tool shown at the very beginning of the video: https://www.performancebike.com/shimano-tlpd40-pedal-axle-removal-tool-y42a09000/p325010
The fitting you put into vice jaws to hold the pedals is nice, but you can get by without it.