What's the actual limit to the length of a DataStore value?

It’s supposedly 260,000 characters, but I’m trimming save data into 250k character chunks and it still gives that error.
Is there terminology confusion here? Strings in Roblox must be using 2 bytes per character since such a wide range of characters is supported, but the limit in data stores could be referring to 1-byte characters, which would mean the actual limit as far as developers are concerned is 130,000 characters.

1 Like

Have you confirmed that trimming it to 240k also result the same error?


:thinking:

Some unicode have above 8 bits, it can range up to 4 byte a character.

If 10,000 under the limit doesn’t help, I don’t see why 20,000 would.

Well, I’m actually confused why the data stores article actually wrote 260k limit. I do believe it includes all the other characters that are not strings.

Are you just trying to store a single string of 260K characters? What’s your test here? How are you getting your numbers?

Did you measure the length of the string you set or the length of the string you encoded?

print(#"\"\"")
--> 2
print(#game:GetService"HttpService":JSONEncode"\"\"")
--> 6
2 Likes