You could use the buffer library to decode base64 encoded data in a react native app.

npm i buffer 

Once installed you can import the buffer library into your react native app

import { Buffer } from 'buffer';

and then decode base64 encoded data

Buffer.from(data, 'base64');

The line above returns the decoded data as bytes and

Buffer.from(data, 'base64').toString('ascii');

returns the decoded data as an ascii encoded string.

Answer from Susanne on Stack Overflow
Discussions

React-Native: Convert image url to base64 string
I'm building a react native app that needs to store images at base64 string format for offline viewing capabilities. What library / function would give me the best result to store the image as bas... More on stackoverflow.com
🌐 stackoverflow.com
How to convert base64 image data to data URL in react native?
I am using react-native-signature-canvas which returns the signature as a base64 image string. I want to send it to the API and before that, I want to convert it to the data URL. Can anyone help me... More on stackoverflow.com
🌐 stackoverflow.com
January 23, 2022
Join the Expo Developers Discord Server!
Expo brings together the best of the web and mobile for making apps that run on Android, iOS, and web. | 71213 members More on forums.expo.dev
🌐 forums.expo.dev
August 8, 2018
React-native decoded base64 encoded string - Stack Overflow
I try to decode base64 encoded string token in react native, atob not work and library like js-base64 not resolve the problem. Someone have a solution ? More on stackoverflow.com
🌐 stackoverflow.com
🌐
npm
npmjs.com › package › react-native-base64
react-native-base64 - npm
September 21, 2025 - Latest version: 0.2.2, last published: 9 months ago. Start using react-native-base64 in your project by running `npm i react-native-base64`. There are 120 other projects in the npm registry using ...
      » npm install react-native-base64
    
Published   Sep 21, 2025
Version   0.2.2
🌐
Stack Overflow
stackoverflow.com › questions › 70820488 › how-to-convert-base64-image-data-to-data-url-in-react-native › 70820872
How to convert base64 image data to data URL in react native?
January 23, 2022 - import RNFS from 'react-native-fs'; import {Platform} from 'react-native'; const createTempImage = async base64String => { try { let base64 = base64String.replace('data:image/png;base64,', ''); const fileName = `${Date.now()}.png`; // creates a file in temporary directory to delete later const path = `${RNFS.TemporaryDirectoryPath}/${fileName}`; await RNFS.writeFile(path, base64, 'base64'); const image = { uri: Platform.OS == 'ios'? path: 'file://' + path, name: fileName, type: 'image/png', }; return image } catch (error) { console.log(error); } };
🌐
Today I Learned
til.hashrocket.com › posts › b209c6ba05-how-to-render-base64-encoded-image-on-react-native
How to Render Base64 Encoded Image on React Native - Today I Learned
March 29, 2023 - const encodedData = 'R0lGODlhAQABAIAAAAAA...7'; <Image source={{uri: `data:image/gif;base64,${encodedData}`}} /> Tweet · #react · permalink · raw · 62 · See More #react TILs · Looking for help? At Hashrocket, our JavaScript experts launch scalable, performant apps on the Web, Android and iOS.
🌐
Expo
forums.expo.dev › t › how-to-convert-a-file-into-base64-string-in-react-native › 12465
Join the Expo Developers Discord Server!
August 8, 2018 - Expo brings together the best of the web and mobile for making apps that run on Android, iOS, and web. | 71213 members
Find elsewhere
🌐
npm
npmjs.com › package › react-native-image-base64
react-native-image-base64 - npm
If you encounter OOM errors on ... on Android might cause very high memory usage. npm install react-native-image-base64 --save or yarn add react-native-image-base64...
      » npm install react-native-image-base64
    
Published   Dec 16, 2019
Version   0.1.4
🌐
Bigscal
bigscal.com › cross platform
Master Base64 Images in React Native Apps
February 11, 2026 - It is possible to load base64 encoded images by decoding them to base64 format on the server side and sending a data URI. After the image loads the user can save the image to their local device.
🌐
Stack Overflow
stackoverflow.com › questions › 62485527 › a-replacement-for-binarytobase64-that-can-be-used-in-react-native
base64 - A replacement for binaryToBase64 that can be used in react-native - Stack Overflow
June 20, 2020 - I have been using react-native's binaryToBase64, but it doesn't exist in new react-native versions (such as 0.62.2). Any suggestion on what to use instead? I tried js btoa(), but results are different, any idea why? ... Answered here. Thanks, EyMaddis! This is now more aligned with the rest of the JS ecosystem: base64.js:
🌐
Medium
medium.com › @webnersolutions1 › get-base64-string-from-file-url-on-react-native-app-82ce32e8d36d
Get base64 String From File URL On React Native App | by Webner Solutions | Medium
July 9, 2021 - let imagePath = "https://miro.medium.com/max/1856/1*TV0dKZKjMjp1J7b9oW58Rg.jpeg"; // set the image/video path here RNFetchBlob.config({ fileCache: true }).fetch("GET", imagePath) // the file is now downloaded at local storage .then(resp => { imagePath = resp.path(); // to get the file path return resp.readFile("base64"); // to get the base64 string }) .then(base64 => { // here base64 encoded file data is returned this.setState({base64Data: base64}); return fs.unlink(imagePath); // to remove the file from local storage });
🌐
Bigscal
bigscal.com › cross platform
How do you download base64 images in React Native?
February 11, 2026 - It is possible to load base64 encoded images by decoding them to base64 format on the server side and sending a data URI. After the image loads the user can save the image to their local device.
🌐
Stack Overflow
stackoverflow.com › questions › 72338876 › uploading-a-base64-encoded-image-as-uri-from-react-native
xmlhttprequest - Uploading a base64 encoded image (as uri) from React Native - Stack Overflow
Is my only option to convert to ... new function to convert to blob would be a little too much for beginners. ... You can not send Base64 as uri....
🌐
Webner Blogs
blog.webnersolutions.com › home › get base64 string from file url
Get base64 String From File URL On React Native App
July 9, 2021 - let imagePath = "https://miro.medium.com/max/1856/1*TV0dKZKjMjp1J7b9oW58Rg.jpeg"; // set the image/video path here RNFetchBlob.config({ fileCache: true }).fetch("GET", imagePath) // the file is now downloaded at local storage .then(resp => { imagePath = resp.path(); // to get the file path return resp.readFile("base64"); // to get the base64 string }) .then(base64 => { // here base64 encoded file data is returned this.setState({base64Data: base64}); return fs.unlink(imagePath); // to remove the file from local storage });
🌐
GitHub
github.com › react-native-community › react-native-video › issues › 266
Base64 string for source? · Issue #266 · TheWidlarzGroup/react-native-video
July 11, 2016 - Hi, can the source take a base64 string for the URI? I know can. Was wondering if this had the same capability.
Author   TheWidlarzGroup
🌐
GitHub
github.com › LeeKyoungIl › react-native-image-converter
GitHub - LeeKyoungIl/react-native-image-converter: Modify local images by React-native module · GitHub
In the Xcode, in the project navigator and right click Libraries -> Add Files to your project name · Go to node_modules -> react-native-image-converter and add RNImageConverter.xcodeproj ·
Starred by 5 users
Forked by 3 users
Languages   Java 58.1% | Objective-C 29.8% | JavaScript 9.2% | Ruby 2.9%
🌐
npm
npmjs.com › package › react-native-image-to-base64
react-native-image-to-base64 - npm
September 21, 2016 - Run react-native link react-native-image-to-base64 (RN 0.29.1+, otherwise rnpm link react-native-image-to-base64) NativeModules.RNImageToBase64.getBase64String(uri, (err, base64) => { // Do something with the base64 string · }) React-Native ...
      » npm install react-native-image-to-base64
    
Published   Sep 21, 2016
Version   0.1.0
Author   Fumihiro Xue
🌐
GitHub
github.com › RonRadtke › react-native-blob-util › issues › 233
Write base64 to device storage · Issue #233 · RonRadtke/react-native-blob-util
March 16, 2023 - react-native-blob-util: 0.17.2 · I have an image file as a base64 encoded string that I would like to save to the device. What would be the most direct way to store this image? This is what I have at the moment but running it on Android gives me [TypeError: Network request failed] - on iOS it seems to create the file because when I run it again I'm told that the file already exist. I just don't see the file on the device at all. let uri = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYA=='; let fs = ReactNativeBlobUtil.fs; let { dirs } = fs; let base64 = ReactNativeBlobUtil.base64; let path = await fs.createFile( dirs.PictureDir, base64.encode(uri), 'base64' ); console.log(path) Reactions are currently unavailable ·
Author   RonRadtke