PHPackages                             olegf13/base64url - 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. olegf13/base64url

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

olegf13/base64url
=================

Base64 encoder/decoder with URL safe alphabet (base64url).

1.0(7y ago)017MITPHPPHP &gt;=7.0

Since Aug 1Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Olegf13/base64url)[ Packagist](https://packagist.org/packages/olegf13/base64url)[ Docs](https://github.com/Olegf13/base64url)[ RSS](/packages/olegf13-base64url/feed)WikiDiscussions master Synced yesterday

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

Base64url encoder/decoder
=========================

[](#base64url-encoderdecoder)

Base64 encoder/decoder with URL safe alphabet (base64url).

Modified Base64 with URL (and filename) safe alphabet, where the '+' and '/' characters of standard Base64 are respectively replaced by '-' and '\_', and the padding '=' signs are omitted.

See base64url reference in [RFC 4648](https://tools.ietf.org/html/rfc4648#section-5).

Given the example input *????SlashAndPlus&gt;&gt;&gt;*, standard base64 encoded result equals to *Pz8/P1NsYXNoQW5kUGx1cz4+Pg==*, where base64url version produces *Pz8\_P1NsYXNoQW5kUGx1cz4-Pg*.

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

[](#requirements)

The library requires PHP 5.6 or above for basic usage.

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

[](#installation)

The preferred way to install this library is through [Composer](http://getcomposer.org/download/). To install the latest version, run:

```
composer require olegf13/base64url

```

Basic usage
-----------

[](#basic-usage)

```
