PHPackages                             normeno/base64-handler - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. normeno/base64-handler

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

normeno/base64-handler
======================

Base64 Handler

v1.0(7y ago)113MITPHPPHP ^7.0

Since Jul 30Pushed 7y ago1 watchersCompare

[ Source](https://github.com/normeno/base64-handler)[ Packagist](https://packagist.org/packages/normeno/base64-handler)[ RSS](/packages/normeno-base64-handler/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (2)Used By (0)

Base64 Handler
==============

[](#base64-handler)

[![Latest Stable Version](https://camo.githubusercontent.com/1e9704bfba52b895964541cc0c3c6b58788aaed8e6f91dfa7f108a3d603cc2e1/68747470733a2f2f706f7365722e707567782e6f72672f6e6f726d656e6f2f6261736536342d68616e646c65722f762f737461626c65)](https://packagist.org/packages/normeno/base64-handler)[![Latest Unstable Version](https://camo.githubusercontent.com/1ac78376f95efa5bacaf6fbf62df5aa7c7b57dbc6190f7351cb24b504e9e7722/68747470733a2f2f706f7365722e707567782e6f72672f6e6f726d656e6f2f6261736536342d68616e646c65722f762f756e737461626c65)](https://packagist.org/packages/normeno/base64-handler)[![Build Status](https://camo.githubusercontent.com/1d3e492f67d10d77a4557b58e7bfa8a712569a5d2d9b2f0c19b1b5655019b9ff/68747470733a2f2f7472617669732d63692e6f72672f6e6f726d656e6f2f6261736536342d68616e646c65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/normeno/base64-handler)[![Quality Score](https://camo.githubusercontent.com/5580a685a5af86286bc3e1b7314ea0687d6bd007868eee508b4fb555ff050ecf/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6e6f726d656e6f2f6261736536342d68616e646c65722e737667)](https://scrutinizer-ci.com/g/normeno/base64-handler)[![Total Downloads](https://camo.githubusercontent.com/fdcc669bc660871dc5c1fff3de3e49d0eb977987775766f954f76b974b06590d/68747470733a2f2f706f7365722e707567782e6f72672f6e6f726d656e6f2f6261736536342d68616e646c65722f646f776e6c6f616473)](https://packagist.org/packages/normeno/base64-handler)[![License](https://camo.githubusercontent.com/b455049e0ba4ac91c4330b9a58741682c451c6b90f7b8730fdc9d2bc16d57ec1/68747470733a2f2f706f7365722e707567782e6f72672f6e6f726d656e6f2f6261736536342d68616e646c65722f6c6963656e7365)](https://packagist.org/packages/normeno/base64-handler)

A simple and powerful package to handle base64.

*Currently only tested with images (png, jpg, svg, doc, docx, pdf)*

Requirements
------------

[](#requirements)

- PHP &gt;= 7.1

Usage
-----

[](#usage)

### Init library

[](#init-library)

```
$base64Handler = new Base64Handler();
```

### File to Base64

[](#file-to-base64)

**Path**

```
$file = 'path/to/file.png';
$convert = $base64Handler->toBase64($file);
```

**URL**

```
$file = 'http://icons.iconarchive.com/icons/graphicloads/100-flat/256/home-icon.png';
$convert = $base64Handler->toBase64($file);
```

### Base64 to File

[](#base64-to-file)

```
$base64 = 'xyz';
$convert = $base64Handler->toFile($base64);
```

### Check base64 type

[](#check-base64-type)

```
$base64 = 'xyz';
$getFile = $base64Handler->getBase64Type($base64);
```

TO-DO
-----

[](#to-do)

- Check if base64 is a PDF

License
-------

[](#license)

The *Base64 Handler* is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

Donate
------

[](#donate)

If you find this project useful, you can buy author a glass of juice

- [Buy me a coffee](https://www.buymeacoff.ee/normeno)

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2892d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6278347?v=4)[Nicolás Ormeño](/maintainers/normeno)[@normeno](https://github.com/normeno)

---

Top Contributors

[![normeno](https://avatars.githubusercontent.com/u/6278347?v=4)](https://github.com/normeno "normeno (31 commits)")

---

Tags

base64laravellibrarylumenphp7base64base64 handler

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/normeno-base64-handler/health.svg)

```
[![Health](https://phpackages.com/badges/normeno-base64-handler/health.svg)](https://phpackages.com/packages/normeno-base64-handler)
```

###  Alternatives

[paragonie/constant_time_encoding

Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)

903351.6M180](/packages/paragonie-constant-time-encoding)[spomky-labs/base64url

Base 64 URL Safe Encoding/Decoding PHP Library

15441.7M57](/packages/spomky-labs-base64url)[delight-im/base64

Simple and convenient Base64 encoding and decoding for PHP

15167.1k6](/packages/delight-im-base64)[xobotyi/basen

Text and integers encoding utilities for PHP with no extensions dependencies. Base32, Base58, Base64 and much more!

1220.1k](/packages/xobotyi-basen)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
