# Bug - Move Binary Data - Base64

**URL:** <https://community.n8n.io/t/bug-move-binary-data-base64/9503>\
**Category:** Questions\
**Tags:** node\
**Created:** [November 29, 2021, 3:22pm UTC](https://community.n8n.io/t/bug-move-binary-data-base64/9503 "2021-11-29T15:22:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![laurens-novyx](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/laurens-novyx/32/5301_2.png) [@laurens-novyx](https://community.n8n.io/u/laurens-novyx)\
**Post date:** [November 29, 2021, 3:22pm UTC](https://community.n8n.io/t/bug-move-binary-data-base64/9503/1 "2021-11-29T15:22:35Z")

</div>

## Describe the issue/error/question

When I use the **Move Binary Data** node to encode binary data to base64 in json I receive an error. The binary files are PDF files and in my test I have 2 records with correct binary files. When I try to convert these into Base64 I received an N8N-error.

## What is the error message (if any)?

ERROR: Unexpected token J in JSON at position 0

 ![Screenshot 2021-11-29 at 16.15.07](https://europe1.discourse-cdn.com/n8n/original/2X/b/beb05cd3f3b0b244721766c1557b2cd50008468d.png)

## Please share the workflow

{  
“nodes”: [  
{  
“parameters”: {  
“authentication”: “oAuth2”,  
“url”: “=[https://eu40.salesforce.com/services/data/v53.0/sobjects/ContentVersion/{{$json[\“Id\”]}](https://eu40.salesforce.com/services/data/v53.0/sobjects/ContentVersion/%7B%7B$json%5B%5C%22Id%5C%22%5D%7D)}/VersionData”,  
“responseFormat”: “file”,  
“options”: {}  
},  
“name”: “Get SF Documents”,  
“type”: “n8n-nodes-base.httpRequest”,  
“typeVersion”: 1,  
“position”: [  
2340,  
500  
],  
“credentials”: {  
“oAuth2Api”: {  
“id”: “4”,  
“name”: “SalesForce HTTP”  
}  
}  
},  
{  
“parameters”: {  
“options”: {  
“encoding”: “base64”,  
“keepSource”: false  
}  
},  
“name”: “Encode base64”,  
“type”: “n8n-nodes-base.moveBinaryData”,  
“typeVersion”: 1,  
“position”: [  
2530,  
500  
]  
}  
],  
“connections”: {  
“Get SF Documents”: {  
“main”: [  
[  
{  
“node”: “Encode base64”,  
“type”: “main”,  
“index”: 0  
}  
]  
]  
}  
}  
}

## Share the output returned by the last node

See error.

## Information on your n8n setup

- **n8n version:** 0.151.0
- **Database you’re using (default: SQLite):** PostgreSQL
- **Running n8n with the execution process [own(default), main]:** Own
- **Running n8n via [Docker, npm, n8n.cloud, desktop app]:** Docker on Google Cloud

---

<div class="post-metadata">

**Author:** ![MutedJam](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mutedjam/32/70851_2.png) [@MutedJam](https://community.n8n.io/u/MutedJam)\
**Post date:** [November 29, 2021, 3:25pm UTC](https://community.n8n.io/t/bug-move-binary-data-base64/9503/2 "2021-11-29T15:25:20Z")

</div>

Hi @laurens-novyx, I’m sorry to hear that.

From your screenshot it seems you are converting binary data into n8n-compatible JSON data. Does your base64 content consist of valid JSON? If not, could you try disabling the _Set all Data_ option and see if this works?

 ![image](https://europe1.discourse-cdn.com/n8n/original/2X/e/e74c2020406d622c4a4b218b4cc023269c603c3c.png)

---

<div class="post-metadata">

**Author:** ![laurens-novyx](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/laurens-novyx/32/5301_2.png) [@laurens-novyx](https://community.n8n.io/u/laurens-novyx)\
**Post date:** [November 29, 2021, 3:38pm UTC](https://community.n8n.io/t/bug-move-binary-data-base64/9503/3 "2021-11-29T15:38:22Z")

</div>

That works. Thanks!
