# @upstash/redis: the two serialization defaults that surprise people
## Symptom 1: values come back looking like hashes
await redis.set("key", "value");
const data = await redis.get("key");
console.log(data); // dmFsdWU=
That is base64. The SDK requests base64-encoded responses by default so
binary edge cases do not break res.json() parsing. It normally decodes
for you, but if you see raw base64 you can turn the behavior off:
const redis = new Redis({
// ...
responseEncoding: false,
});
## Symptom 2: your objects come back parsed (or your strings get mangled)
Values are JSON serialized on write and deserialized on read by default.
That is convenient until you store a plain string that happens to look
like JSON, or you want raw bytes. Disable it:
const redis = new Redis({
// ...
automaticDeserialization: false,
});
## Symptom 3: big integers come back as strings
JavaScript cannot safely hold integers above 2^53 - 1, so the SDK returns
them as strings instead of silently corrupting them. This is a language
limit, not a bug. Handle big counters, Snowflake IDs, and similar as
strings or BigInt in your code.
## Rule of thumb
If stored data looks wrong on read but right in the Upstash console data
browser, one of these three defaults is the cause. Check them before you
rewrite your storage layer.