PHPackages                             edgaras/custombase64 - 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. edgaras/custombase64

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

edgaras/custombase64
====================

A PHP package for customizable Base64 encoding and decoding with support for custom character sets and optional reversed output.

1.0.0(1y ago)0162MITPHPPHP &gt;=8.0.0

Since Jan 25Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Edgaras7/CustomBase64)[ Packagist](https://packagist.org/packages/edgaras/custombase64)[ Docs](https://github.com/Edgaras7/CustomBase64)[ RSS](/packages/edgaras-custombase64/feed)WikiDiscussions master Synced today

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

Custom Base 64
==============

[](#custom-base-64)

A PHP package for customizable Base64 encoding and decoding with support for custom character sets and optional reversed output.

Features
--------

[](#features)

- Customizable Base64 character sets.
- Optional reversed output for encoding/decoding.

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

[](#requirements)

PHP 8+

Installation
------------

[](#installation)

1. Use the library via Composer:

```
composer require edgaras/custombase64

```

2. Include the Composer autoloader:

```
require __DIR__ . '/vendor/autoload.php';
```

Usage
-----

[](#usage)

### 1. Initialization

[](#1-initialization)

You can initialize the `CustomBase64` class with optional parameters:

```
use Edgaras\CustomBase64\CustomBase64;

// Default initialization
$base64 = new CustomBase64();

// Custom charset and reversed output
$customChars = 'TPUQVRWXSYZABCDENOFGHIJKLMnopqrstuvwxyzabcdefghijklm0123456789+-';
$reverseOutput = true;
$base64 = new CustomBase64($customChars, $reverseOutput);
```

### 2. Encoding data

[](#2-encoding-data)

Use the `encode` method to convert data into custom Base64 format:

```
$data = "Hello, CustomBase64!";
$encoded = $base64->encode($data);
echo "Encoded: " . $encoded;
// Example output: "=VUC2H2puYHoiO3p1CVSf8WofIWF"
```

### 3. Decoding Data

[](#3-decoding-data)

Decode Base64-encoded strings back to their original form using the `decode` method:

```
$encoded = "=VUC2H2puYHoiO3p1CVSf8WofIWF";
$decoded = $base64->decode($encoded);
echo "Decoded: " . $decoded;
// Example output: "Hello, CustomBase64!"
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

525d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/479996?v=4)[Edgaras](/maintainers/Edgaras)[@edgaras](https://github.com/edgaras)

---

Top Contributors

[![Edgaras0x4E](https://avatars.githubusercontent.com/u/42358442?v=4)](https://github.com/Edgaras0x4E "Edgaras0x4E (1 commits)")

---

Tags

base64base64\_encodebase64\_decodebase-64custom base 64

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/edgaras-custombase64/health.svg)

```
[![Health](https://phpackages.com/badges/edgaras-custombase64/health.svg)](https://phpackages.com/packages/edgaras-custombase64)
```

###  Alternatives

[paragonie/constant_time_encoding

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

908363.2M191](/packages/paragonie-constant-time-encoding)[spomky-labs/base64url

Base 64 URL Safe Encoding/Decoding PHP Library

15442.9M61](/packages/spomky-labs-base64url)[delight-im/base64

Simple and convenient Base64 encoding and decoding for PHP

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

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

1220.4k](/packages/xobotyi-basen)

PHPackages © 2026

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