The open-source code fdesign makes it possible to design digital linear filters for the Hankel and Fourier transforms used in potential, diffusive, and wavefield modeling. Digital filters can be derived for any electromagnetic (EM) method, such as methods in the diffusive limits (direct current, controlledsource EM [CSEM]) as well as methods using higher frequency content (ground-penetrating radar [GPR], acoustic and elastic wavefields). The direct matrix inversion method is used for the derivation of the filter values, and a brute-force minimization search is carried out over the defined spacing and shifting values of the filter basis. Included or user-provided theoretical transform pairs are used for the inversion. Alternatively, one can provide layered subsurface models that will be computed with a precise quadrature method using the EM modeler empymod to generate numerical transform pairs. The comparison of the presented 201 pt filter with previously presented filters indicates that it performs better for some standard CSEM cases. The derivation of a longer 2001 pt filter for a GPR example with a 250 MHz center frequency proves that the filter method works not only for diffusive EM fields but also for wave phenomena. The presented algorithm provides a tool to create problem specific digital filters. Such purpose-built filters can be made shorter and can speed up consecutive potential, diffusive, and wavefield inversions.