# @ilihub/string-to-base64

Encode a string to base64

![NPM Version](https://img.shields.io/npm/v/%40ilihub%2Fstring-to-base64?color=33cd56&logo=npm)
![NPM](https://img.shields.io/npm/l/%40ilihub%2Fstring-to-base64)
[![CodeFactor](https://www.codefactor.io/repository/github/ilihub/npm/badge)](https://www.codefactor.io/repository/github/ilihub/npm)
[![Socket Badge](https://socket.dev/api/badge/npm/package/@ilihub/string-to-base64)](https://socket.dev/npm/package/@ilihub/string-to-base64)

## Installation

```bash
# if you're using pnpm
pnpm add @ilihub/string-to-base64

# or, if you're using npm
npm install @ilihub/string-to-base64

# or, if you're using yarn
yarn add @ilihub/string-to-base64
```

## Usage

```javascript
import { StringToBase64 } from "@ilihub/string-to-base64";

const string = "Hello World!";

const base64String = StringToBase64(string);
console.log(base64String); // SGVsbG8gV29ybGQh
```

---

## 🛠️ Online Tool ⚡

You can use this npm package as an online tool by clicking on the link provided [👉🏻 here 👈🏻](https://ilihub.tech/tools/string-to-base64)

---

<!-- sponsors_and_backers_section_start -->

<!-- Please do not edit/update this section manually, it is automatically generated by the `sponsors.yml` workflow -->

## Sponsors & Backers

Support the development of new open-source projects from ilihub through crowdfunding.

The core of ilihub is our crowd-funded open-source projects, licensed under the permissive MIT license. Sponsorship increases the rate of bug fixes, documentation improvements, and feature development.

![Sponsors](https://raw.githubusercontent.com/ilihub/sponsors/sponsors/sponsors.svg)

<!-- sponsors_and_backers_section_end -->

---
