You can convert the ttf online using this free tool: https://cloudconvert.com/ttf-converter
woff2 is widely supported (https://caniuse.com/#feat=woff2) and can be output by https://github.com/fonttools/fonttools or https://github.com/google/woff2. Depending on your browser support listing woff2 and the [ot]tf as sources might be sufficient, if not there are converters for many other formats.
I am using Ubuntu.
The ttf / otf → woff utility is woff-tools.
The ttf / otf → woff2 utility is woff2.
These two utilities provide convenient command-line conversions to the desired formats.