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

ActiveLibrary

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)0159MITPHPPHP &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 1mo ago

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 49% of packages

Maintenance42

Moderate activity, may be stable

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

479d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eb360d69caebafdf5339cd93817328b6fa1784f023009a6c27d84151bf212b01?d=identicon)[Edgaras](/maintainers/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)

903329.7M148](/packages/paragonie-constant-time-encoding)[intervention/validation

Additional validation rules for the Laravel framework

6826.7M8](/packages/intervention-validation)[spomky-labs/base64url

Base 64 URL Safe Encoding/Decoding PHP Library

15439.5M49](/packages/spomky-labs-base64url)[zbateson/stream-decorators

PHP psr7 stream decorators for mime message part streams

4748.6M6](/packages/zbateson-stream-decorators)[elfsundae/laravel-hashid

A simple, elegant way to obfuscate your data by generating reversible, non-sequential, URL-safe identifiers.

415246.3k2](/packages/elfsundae-laravel-hashid)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.9M8](/packages/crazybooot-base64-validation)

PHPackages © 2026

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