PHPackages                             spatie/emoji - 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. spatie/emoji

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

spatie/emoji
============

Display emoji characters

4.1.2(5mo ago)4671.2M↓10.2%5020MITPHPPHP ^8.3CI passing

Since Feb 7Pushed 5mo ago8 watchersCompare

[ Source](https://github.com/spatie/emoji)[ Packagist](https://packagist.org/packages/spatie/emoji)[ Docs](https://github.com/spatie/emoji)[ Fund](https://spatie.be/open-source/support-us)[ GitHub Sponsors](https://github.com/spatie)[ RSS](/packages/spatie-emoji/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (24)Used By (20)

Programatically work with emoji characters
==========================================

[](#programatically-work-with-emoji-characters)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a244c02b38171585733ff9ea81dc05fb6ba68067c7155129007b1bf69a71a47f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7370617469652f656d6f6a692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/emoji)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Tests](https://github.com/spatie/emoji/workflows/Tests/badge.svg)](https://github.com/spatie/emoji/workflows/Tests/badge.svg)[![Total Downloads](https://camo.githubusercontent.com/160d51553b82dbbe7319a7c96b1fe3835e014ded6586c922427c7d9628169bce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7370617469652f656d6f6a692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/emoji)

In PHP, you can display emoji characters just by typing them:

```
echo "😃";
```

This package provides some functionality to work with emojis if your IDE or used font can't render them correctly:

```
Emoji::grinningFace();
```

Spatie is a webdesign agency based in Antwerp, Belgium. You'll find an overview of all our open source projects [on our website](https://spatie.be/opensource).

Support us
----------

[](#support-us)

[![](https://camo.githubusercontent.com/313dc432eb3a7f71214fcf321b337b2e3c1fe6307460d52d52203c4d9d1b934a/68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f656d6f6a692e6a70673f743d31)](https://spatie.be/github-ad-click/emoji)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

Postcardware
------------

[](#postcardware)

You're free to use this package (it's [MIT-licensed](LICENSE.md)), but if it makes it to your production environment you are required to send us a postcard from your hometown, mentioning which of our package(s) you are using.

Our address is: Spatie, Kruikstraat 22, 2018 Antwerp, Belgium.

The best postcards will get published on the open source page on our website.

Install
-------

[](#install)

You can install the package via composer:

```
composer require spatie/emoji
```

Usage
-----

[](#usage)

The `Spatie\Emoji\Emoji`-class contains character constants that may be used directly:

```
Emoji::CHARACTER_GRINNING_FACE;
```

Or you can use the shorter method by leaving off "character" and using camelCase:

```
Emoji::grinningFace();
```

If you want to get an array containing all emojis, you can use this method:

```
Emoji::all();
```

You can also use an [ISO 3166 Alpha2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code and get the appropriate flag for the country:

```
Emoji::countryFlag('be'); // 🇧🇪
```

This package contains Full Emoji List v15.1 based on  all methods and constants are auto-generated.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

We are accepting PRs that add characters to the class. Please use [this list](http://unicode.org/emoji/charts/full-emoji-list.html) to look up the unicode value and the name of the character.

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you've found a bug regarding security please mail  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Freek Van der Herten](https://github.com/freekmurze)
- [BoGnY](https://github.com/bogny)
- [All Contributors](../../contributors)

About Spatie
------------

[](#about-spatie)

Spatie is a webdesign agency based in Antwerp, Belgium. You'll find an overview of all our open source projects [on our website](https://spatie.be/opensource).

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

68

—

FairBetter than 100% of packages

Maintenance70

Regular maintenance activity

Popularity60

Solid adoption and visibility

Community40

Growing community involvement

Maturity88

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 54.9% 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 ~162 days

Recently: every ~380 days

Total

23

Last Release

174d ago

Major Versions

0.0.1 → 1.0.02016-02-07

1.0.7 → 2.0.02018-10-17

2.3.1 → 3.0.02021-09-27

3.0.0 → 4.0.02022-09-22

PHP version history (5 changes)0.0.1PHP ^7.0

2.1.0PHP ^7.2

2.2.0PHP ^7.2|^8.0

4.1.0PHP ^8.1

4.1.2PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7535935?v=4)[Spatie](/maintainers/spatie)[@spatie](https://github.com/spatie)

---

Top Contributors

[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (113 commits)")[![Gummibeer](https://avatars.githubusercontent.com/u/6187884?v=4)](https://github.com/Gummibeer "Gummibeer (22 commits)")[![mallardduck](https://avatars.githubusercontent.com/u/619938?v=4)](https://github.com/mallardduck "mallardduck (20 commits)")[![AdrianMrn](https://avatars.githubusercontent.com/u/12762044?v=4)](https://github.com/AdrianMrn "AdrianMrn (10 commits)")[![alexmanase](https://avatars.githubusercontent.com/u/10696975?v=4)](https://github.com/alexmanase "alexmanase (8 commits)")[![Nielsvanpach](https://avatars.githubusercontent.com/u/10651054?v=4)](https://github.com/Nielsvanpach "Nielsvanpach (6 commits)")[![rubenvanassche](https://avatars.githubusercontent.com/u/619804?v=4)](https://github.com/rubenvanassche "rubenvanassche (3 commits)")[![sunaoka](https://avatars.githubusercontent.com/u/105845?v=4)](https://github.com/sunaoka "sunaoka (3 commits)")[![hannesvdvreken](https://avatars.githubusercontent.com/u/1410358?v=4)](https://github.com/hannesvdvreken "hannesvdvreken (3 commits)")[![alexbowers](https://avatars.githubusercontent.com/u/842974?v=4)](https://github.com/alexbowers "alexbowers (2 commits)")[![SneherAdor](https://avatars.githubusercontent.com/u/24508783?v=4)](https://github.com/SneherAdor "SneherAdor (2 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (2 commits)")[![AlexVanderbist](https://avatars.githubusercontent.com/u/6287961?v=4)](https://github.com/AlexVanderbist "AlexVanderbist (2 commits)")[![umutphp](https://avatars.githubusercontent.com/u/3245166?v=4)](https://github.com/umutphp "umutphp (1 commits)")[![amitmerchant1990](https://avatars.githubusercontent.com/u/3647841?v=4)](https://github.com/amitmerchant1990 "amitmerchant1990 (1 commits)")[![ellen-merchant](https://avatars.githubusercontent.com/u/17761025?v=4)](https://github.com/ellen-merchant "ellen-merchant (1 commits)")[![enescakir](https://avatars.githubusercontent.com/u/993199?v=4)](https://github.com/enescakir "enescakir (1 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (1 commits)")[![ian-patel](https://avatars.githubusercontent.com/u/9893863?v=4)](https://github.com/ian-patel "ian-patel (1 commits)")[![patinthehat](https://avatars.githubusercontent.com/u/5508707?v=4)](https://github.com/patinthehat "patinthehat (1 commits)")

---

Tags

emojiphpspatieemoji

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/spatie-emoji/health.svg)

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

###  Alternatives

[spatie/laravel-package-tools

Tools for creating Laravel packages

945125.5M7.0k](/packages/spatie-laravel-package-tools)[spatie/laravel-data

Create unified resources and data transfer objects

1.8k28.9M627](/packages/spatie-laravel-data)[spatie/laravel-analytics

A Laravel package to retrieve Google Analytics data.

3.2k5.7M57](/packages/spatie-laravel-analytics)[spatie/macroable

A trait to dynamically add methods to a class

72759.6M64](/packages/spatie-macroable)[rinvex/countries

Rinvex Countries is a simple and lightweight package for retrieving country details with flexibility. A whole bunch of data including name, demonym, capital, iso codes, dialling codes, geo data, currencies, flags, emoji, and other attributes for all 250 countries worldwide at your fingertips.

1.7k7.4M48](/packages/rinvex-countries)[spatie/regex

A sane interface for php's built in preg\_\* functions

1.1k17.1M59](/packages/spatie-regex)

PHPackages © 2026

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