Magic‎ > ‎Spells (Paizo)‎ > ‎P‎ > ‎

Polymorph Any Object


School transmutation (polymorph); Level sorcerer/wizard 8; Subdomain construct 8

CASTING

Casting Time 1 standard action
Components V, S, M/DF (mercury, gum arabic, and smoke)

EFFECT

Range close (25 ft. + 5 ft./2 levels)
Target one creature, or one non-magical object of up to 100 cu. ft./level
Duration see text
Saving Throw Fortitude negates (object); see text; Spell Resistance yes (object)

By the way...
A ship is a collection of numerous objects. As a result, any ship of Huge size or larger is too big to be affected by this spell.

Source Skull & Shackles Player's Guide