If you are storing data in tables, you can use HttpService:JSONEncode()
local dataStore = game:GetService("DataStoreService")
local exampleData = dataStore:GetDataStore("exampleData")
local HTTP = game:GetService("HttpService")
local suc,dat = pcall(function()
return exampleData:GetAsnyc("Key_Name")
end)
print(string.len(HTTP:JSONEncode(dat)))
I didn’t tested it, so I can’t totally say this is works.