If you know the syntax for a .m3u8 playlist file, you could manually create it from a text source or write it completely down using a text editor. But you probably won't find a convertor that would process any text file (.txt) and generate a .m3u8 playlist.
Convert Simple text to UTF-8 M3U playlist.
We have found 2 software records in our database eligible for .txt to .m3u8 file format conversion.
Microsoft Windows software - convert txt to m3u8 on Windows
A free source code and text editor for Windows
Convert from txt file format
The tables with software actions are a good pointer for what a certain program does with various file types and often may give users a good hint how to perform certain file conversion, for example the above-mentioned txt to m3u8. However, it is not perfect and sometimes can show results which are not really usable because of how certain programs work with files and the possible conversion is thus actually not possible at all.
Apple macOS / Mac OS X software - convert txt to m3u8 on OS X
The default text editor in Mac OS X