Add a Leading Zero with a number field
There aren't any filters built in to Craft (or Twig) that does this, but your {% if %} conditional could be trimmed down to a single-line ternary operation:

{% set episodeNumber = (entry.episodeNumber &lt; 10 ? '0') ~ entry.episodeNumber %}


or even

&lt;span&gt;{{ (entry.episodeNumber &lt; 10 ? '0') ~ entry.episodeNumber }}&lt;/span&gt;