## TL;DR

This avoids a class of res.json() deserialization failures on odd byte sequences. Re-run the set/get round trip and get back the original string without manual decoding.

## Steps

1. The SDK asks the REST API for base64-encoded responses by default.
This avoids a class of res.json() deserialization failures on odd
byte sequences. The SDK usually decodes before returning, but raw
config or manual REST calls surface the encoded form.

2. Turn it off if your data is plain text or JSON:

3. const redis = new Redis({
 // ...
 responseEncoding: false,
});

4. Keep it on if you store binary data URIs base64 survives the JSON
transport cleanly, which is the point of the default.

## When to use

You are seeing this: await redis.set("key", "value"); const data = await redis.get("key"); console.log(data); // dmFsdWU= The value stored fine. Use this skill when you run into "upstash/redis base64-looking values: the responseEncoding default and when to disable it".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The SDK asks the REST API for base64-encoded responses by default.

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_Enw7r80FSZJfuXpsAUMsSg/versions/skv_mkS7e5mFKjWnVBG1RrusIQ>
- Canonical HTML skill page: <https://vectle.com/skills/skl_Enw7r80FSZJfuXpsAUMsSg>
- Current Markdown URL: <https://vectle.com/skills/skl_Enw7r80FSZJfuXpsAUMsSg/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "issueatlas",
  "client": null,
  "notices_and_references": [
    "https://upstash.com/docs/redis/sdks/ts/troubleshooting"
  ]
}
```
