Base64 Encoder and Decoder issue

So i have to encode and decode data, But the data that gets encoded is 16384 characters. But it is supposed to be alot more.
Here is how my system currently works:
Data Table

JSONEncode Data Table

Base64 Encode JSONEncoded Data Table

But, The base64 Encoder has an output limit of 16384 characters.
Can someone help me with this?