Decoding base64-encoded audio content

I have an API request set up that returns base-64 encoded audio content. I would like to play this audio using the music player as well as save it to the database as a file.

In order to do this, I need to first decode it to binary. I think this can be done using the Encode Decode Encrypt Decrypt plugin from @ZeroqodeSupport.

Once I have the binary, how can I write it to an mp3 file that can then be stored in the database and played in the music player? Perhaps using some custom javascript to save the binary returned from the Encode Decode Encrypt Decrypt plugin to an mp3 file and the javascript to bubble plugin to pass the file to the music player and the database.

Thanks in advance for the help!

Hi @ryanellman

I use Integromat to do the job.

Have you solved this? I need exactly the same haha

There’s a way to play base64 audio directly in the player, just add before the code this text:

data:audio/mp3;base64,(insert here your base64 code)


I actually ended up doing exactly what you described haha - just saved the Base64 string to the database and it can be conditionally queried using bubble’s standard interface and it works perfectly.

1 Like