In Patrick O'Brian's final novel of the Aubrey-Maturin series, Captain Jack Aubrey is obliged to accept as midshipman a bastard son of the Duke of Clarence, as a "first voyager".
The novel paints a colourful picture of the Duke and acknowledges his reputation as a competent seaman and commander.
William IV is a major character in the second book, where he effectively makes Mozart his personal spy against rival factions within the royal family.
On screen, William has been portrayed as king by Ernst G. Schiffner in the 1936 German film Mädchenjahre einer Königin, based on the play by Geza Silberer about Queen Victoria's early life, Peter Ustinov in the 2001 TV miniseries Victoria and Albert and by Jim Broadbent in the 2009 film The Young Victoria.
He has been depicted as a prince by Scott Forbes in Mrs. Fitzherbert (1947), by Tom Gill in The First Gentleman (1948), by Toby Jones in Amazing Grace (2006), which included a historical inaccuracy, in that Prince William was depicted sitting in the House of Commons, and by Seamus Dillane in Queen Charlotte: A Bridgerton Story (2023).