PHPackages                             useralberto/craft-base64-filters - 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. [Templating &amp; Views](/categories/templating)
4. /
5. useralberto/craft-base64-filters

ActiveCraft-plugin[Templating &amp; Views](/categories/templating)

useralberto/craft-base64-filters
================================

The plugin adds filters to Twig to encode and decode a string in base64.

1.0.1(3y ago)0424MITPHPPHP &gt;=8.0.2

Since Jan 23Pushed 3y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

Base64 filters
==============

[](#base64-filters)

The plugin adds filters to Twig to encode and decode a string in base64.

The plugin is inspired by [String Base64](https://plugins.craftcms.com/string-base6) for reasons that are explained [issues](https://github.com/cavellblood/craft-string-base64/issues/1#issuecomment-1180450387) is that it was decided to make this plugin for craft cms 4.

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

[](#requirements)

This plugin requires Craft CMS 4.3.6.1 or later, and PHP 8.0.2 or later.

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

[](#installation)

You can install this plugin from the Plugin Store or with Composer.

#### From the Plugin Store

[](#from-the-plugin-store)

Go to the Plugin Store in your project’s Control Panel and search for “Base64 filters”. Then press “Install”.

#### With Composer

[](#with-composer)

Open your terminal and run the following commands:

```
# go to the project directory
cd /path/to/my-project.test

# tell Composer to load the plugin
composer require useralberto/craft-base64-filters

# tell Craft to install the plugin
./craft plugin/install base64-filters
```

Using Base64 filters
====================

[](#using-base64-filters)

Encoding
--------

[](#encoding)

Input:

```
{{ 'Hola mundo'|base64enc }}

```

Output:

```
SG9sYSBtdW5kbw==

```

Decoding
--------

[](#decoding)

Input:

```
{{ 'SG9sYSBtdW5kbw=='|base64dec }}

```

Output:

```
Hola mundo

```

Encrypts and base64-encodes
---------------------------

[](#encrypts-and-base64-encodes)

Input:

```
{{ 'Hola mundo'|base64encry }}

```

Output:

```
base64:Y3J5cHQ65VQ48cNrJesAzlRNO2EkkzQ4MmZjNDliYTE0YmJkMzNlZTU4NzQ3MjI2MmQxYmNmMmEwYjM2ODZhM2RlZjdkOWFkYTc4YTYwNDZmMDVjOGPlO1T5YKL3x7JWqlB6wkC86Stw0onxNcxFYwZfiTIRog==

```

Base64-decodes and decrypts
---------------------------

[](#base64-decodes-and-decrypts)

Input:

```
{{ 'base64:Y3J5cHQ65VQ48cNrJesAzlRNO2EkkzQ4MmZjNDliYTE0YmJkMzNlZTU4NzQ3MjI2MmQxYmNmMmEwYjM2ODZhM2RlZjdkOWFkYTc4YTYwNDZmMDVjOGPlO1T5YKL3x7JWqlB6wkC86Stw0onxNcxFYwZfiTIRog=='|base64decry }}

```

Output:

```
Hola mundo

```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

Every ~64 days

Total

2

Last Release

1194d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ebe9fafb8438d7cf81248ca842fdb75c5db99f6b561a4931351160cc3c1a0478?d=identicon)[useralberto](/maintainers/useralberto)

---

Top Contributors

[![lalonso-dev](https://avatars.githubusercontent.com/u/31530471?v=4)](https://github.com/lalonso-dev "lalonso-dev (13 commits)")

---

Tags

encodedecodecmsCraftcraftcmscraft-plugin

### Embed Badge

![Health badge](/badges/useralberto-craft-base64-filters/health.svg)

```
[![Health](https://phpackages.com/badges/useralberto-craft-base64-filters/health.svg)](https://phpackages.com/packages/useralberto-craft-base64-filters)
```

###  Alternatives

[verbb/formie

The most user-friendly forms plugin for Craft.

102393.6k70](/packages/verbb-formie)[wbrowar/guide

A CMS Guide for Craft CMS.

6154.7k1](/packages/wbrowar-guide)[verbb/vizy

A flexible visual editor field for Craft.

4250.4k](/packages/verbb-vizy)[verbb/hyper

A user-friendly links field for Craft.

24147.8k12](/packages/verbb-hyper)[verbb/footnotes

Adds a footnotes feature to CKEditor fields and Twig templates.

213.6k](/packages/verbb-footnotes)[verbb/events

A full-featured plugin for event management and ticketing.

2311.9k](/packages/verbb-events)

PHPackages © 2026

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