You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

file64

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

file64

Convert Base64 to Blob/File and Blob/File to Base64.

1.0.5
latest
Source
npmnpm
Version published
Weekly downloads
2.6K
-14.24%
Maintainers
1
Weekly downloads
 
Created
Source

file64

NPM

NPM version build codecov

Convert Base64 to Blob/File and Blob/File to Base64.

Installation

NPM:

npm install file64

Yarn:

yarn add file64

Usage

Convert Base64 to Blob:

import { base64ToBlob } from 'file64';

const blob = await base64ToBlob('data:text/plain;base64,YQ==');

Convert Base64 to File:

import { base64ToFile } from 'file64';

const file = await base64ToFile('data:text/plain;base64,YQ==', 'file.txt');

Convert Blob to Base64:

import { blobToBase64 } from 'file64';

const blob = new Blob(['a'], { type: 'text/plain' });
const base64 = await blobToBase64(blob);

Convert File to Base64:

import { fileToBase64 } from 'file64';

const file = new File(['a'], 'file.txt', { type: 'text/plain' });
const base64 = await fileToBase64(file);

Release

Release is automated with Release Please.

License

MIT

Keywords

base64

FAQs

Package last updated on 03 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts