Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

emoji-datasource

iamcal287.4kMIT15.1.2

Emoji data and images

emoji

readme

emoji-data - Easy to consume Emoji data and images

NPM version NPM downloads FOSSA Status

This project provides easy-to-parse data about emoji, along with a spritesheet-style images for use on the web.

The current version supports Emoji version 15.1 (Sept 2023)

You can see a catalog of the emoji data here: http://projects.iamcal.com/emoji-data/table.htm

Installation

The git repo is pretty big (almost 4GB), but contains everything. If you want to use npm, you can:

npm install emoji-datasource

This will only install the 32px full-fidelity spritesheets (with fallback images). If you want different size sheets (16, 20 or 64px), quantized sheets (128 or 256 color), non-fallback (clean) sheets, or the individual images (at 64px) then you'll need to install additional npm modules:

npm install emoji-datasource-apple
npm install emoji-datasource-google
npm install emoji-datasource-twitter
npm install emoji-datasource-facebook

You can also use it without downloading via jsDelivr CDN (different sizes here).

Using the data

The file you want is emoji.json. It contains an array of entries for emoji that look like this:

[
    {
        "name": "WHITE UP POINTING INDEX",
        "unified": "261D-FE0F",
        "non_qualified": "261D",
        "docomo": null,
        "au": "E4F6",
        "softbank": "E00F",
        "google": "FEB98",
        "image": "261d.png",
        "sheet_x": 1,
        "sheet_y": 2,
        "short_name": "point_up",
        "short_names": [
            "point_up"
        ],
        "text": null,
        "texts": null,
        "category": "People & Body",
        "subcategory": "hand-single-finger",
        "sort_order": 170,
        "added_in": "1.4",
        "has_img_apple": true,
        "has_img_google": true,
        "has_img_twitter": true,
        "has_img_facebook": false,
        "skin_variations": {
            "1F3FB": {
                "unified": "261D-1F3FB",
                "image": "261d-1f3fb.png",
                "sheet_x": 1,
                "sheet_y": 3,
                "added_in": "6.0",
                "has_img_apple": true,
                "has_img_google": false,
                "has_img_twitter": false,
                "has_img_facebook": false,
            }
            ...
            "1F3FB-1F3FC": {
                ...
            }
        },
        "obsoletes": "ABCD-1234",
        "obsoleted_by": "5678-90EF"
    },
    ...
]

The meaning of each field is as follows:

Fields Description
name The offical Unicode name, in SHOUTY UPPERCASE.
unified The Unicode codepoint, as 4-5 hex digits. Where an emoji needs 2 or more codepoints, they are specified like 1F1EA-1F1F8. For emoji that need to specifiy a variation selector (-FE0F), that is included here.
non_qualified For emoji that also have usage without a variation selector, that version is included here (otherwise is null).
docomo, au,
softbank, google
The legacy Unicode codepoints used by various mobile vendors.
image The name of the image file.
sheet_x, sheet_y The position of the image in the spritesheets.
short_name The commonly-agreed upon short name for the image, as supported in campfire, github etc via the :colon-syntax:
short_names An array of all the known short names.
text An ASCII version of the emoji (e.g. :)), or null where none exists.
texts An array of ASCII emoji that should convert into this emoji. Each ASCII emoji will only appear against a single emoji entry.
category, subcategory Category and sub-category group names.
sort_order Global sorting index for all emoji, based on Unicode CLDR ordering.
added_in Emoji version in which this codepoint/sequence was added (previously Unicode version).
has_img_* A flag for whether the given image set has an image (named by the image prop) available.
skin_variations For emoji with multiple skin tone variations, a list of alternative glyphs, keyed by the skin tone. For emoji that support multiple skin tones within a single emoji, each skin tone is separated by a dash character.
obsoletes, obsoleted_by Emoji that are no longer used, in preference of gendered versions.

Understanding the spritesheets

For each image set (Apple, Google, etc) we generate several different "sprite sheets" - large images of all emoji stitched together.

Every emoji image in the sheet has a 1 pixel transparent border around it, so the 64px sheet is really made up of 66px squares, while the 16px sheet is really made up of 18px squares, etc. You can find the position of any given image on a sheet using the sheet_x and sheet_y properties, as follows:

x = (sheet_x * (sheet_size + 2)) + 1;
y = (sheet_y * (sheet_size + 2)) + 1;

Inside the Git repo you'll find some sheets in the root directory and some in the sheets-indexed-128, sheets-indexed-256 and sheets-clean directories. In the NPM packages, you'll find them under the img/{$set}/sheets* paths. For example:

Git Repo NPM Packages
/sheet_apple_16.png /img/apple/sheets/16.png
/sheets-indexed-128/sheet_apple_16_indexed_128.png /img/apple/sheets-128/16.png
/sheets-clean/sheet_apple_16_clean.png /img/apple/sheets-clean/16.png

In these examples, the image set is from Apple and the images are 16px on a side. The sheets on the top row are 24 bit color, while the sheets in the middle row use an indexed color palette with only 128 colors. This makes the image much smaller, but sacrifices a lot of quality. Both 128 color and 256 color sheets are provided. The sheets on the bottom row do not contain fallbacks for missing images, so the Google sheet only contains Google images (and no Apple fallbacks). This means that some images are replaced with the fallback character (a question mark), but the usage rights are simpler.

Version history

See CHANGES.md

Image Sources

Images are extracted from their sources and this library attempts to track the latest available versions. If you're looking for older versions of Apple or Android images (such as the Hairy Heart) then you'll need to look at previous revisions.

Image Set Source Version Supported Emoji Missing Images
Apple iOS 17.4 beta Emoji 15.1 3
Google Noto Emoji, v2.042 Emoji 15.1 0
Twitter Twemoji (fork), v15.0.3 Emoji 15.0 118
Facebook v9, fetched 2024-02-05 Emoji 15.0 142
  • Apple images, Copyright © Apple Inc., are not licensed for commercial usage.
  • Android/Google/Noto images, are available under the Apache License 2.0.
  • Twitter images are available under the Creative Commons Attribution 4.0 license.
  • Facebook images, © Facebook, Inc., have no clear licensing.

If you use the spritesheet images and are concerned about usage rights, please use the 'clean' versions, which avoid using fallback images for missing emoji (see the spritesheet section above for more details).

Libraries which use this data

changelog

Change Log

2024-02-26 : v15.1.2

  • Rebuilt Twitter sheets to the correct layout (thanks to @andersk)
  • Rebuilt Facebook sheets to include missing images (thanks to @andersk)

2024-02-13 : v15.1.1

  • Fixed incorrect Scotland flag (thanks to @andersk)
  • Fixed missingnon_qualified fields for gendered emoji (thanks to @andersk)
  • Updated link to Ruby library (thansk to @envek)

2024-02-06 : v15.1.0

  • Update to Emoji 15.1 (thanks to @susnux)
  • Updated Apple images, supporting 15.1
  • Updated Google images, supporting 15.1
  • Update Twitter images to repo fork, supporting 15.0 (thanks to @nerixyz)
  • Added some missing Facebook images, supporting most of 15.0

2023-05-31 : v15.0.1

  • Rebuilt Google quanitized sheets - 128 & 256 color vserions (thanks to @susnux)

2023-05-12 : v15.0.0

  • Update to Emoji 15.0
  • Updated Android images to v2.038
  • Updated Apple images for macOS 13.3.1
  • Updated Facebook images to v9 / Unicode 14.0
  • Gender neutral :bow: is no longer obsoleted by gendered versions (thanks to @whrazer)

2022-03-15 : v14.0.0

  • Changed version numbering to match Unicode/Emoji version numbers
  • Updated to Emoji 14.0
  • Updated Android images to v2.034
  • Updated Apple images for macOS Monterey 12.3
  • Updated Twemoji to v14.0.0
  • Added some recent Facebook emoji (still no broad 13.1 or 14.0 support)

2021-06-15 : v7.0.2

  • Gender neutral :couplekiss: and :couple_with_heart: are no longer obsoleted by gendered versions (thanks to @jwheare)

2021-06-11 : v7.0.1

  • Added 190 missing skin tone variations from 13.1 (thanks to @jwheare)
  • Correctly handle UTF-8 encoding in emoji names (thanks to @jwheare)

2021-06-09 : v7.0.0

  • Updated to Emoji 13.1
  • Updated Android images to v2020-09-16-unicode13_1
  • Updated Twemoji images to 13.1
  • Updated Apple images to Mac OS 11.4
  • Fixed to plural form for shortcode woman/man-with-bunny-ears-partying (fixes #189)

2021-05-08 : v6.1.1

  • NPM packages now include categories.json (fixes #187)
  • Added subcategory property for all emoji (thanks to @ekohilas)
  • Switched sort_order to be globally unique
  • categories.json now includes sub-categories - data structure is not backwards compatible

2021-03-12 : v6.0.1

  • Fixes image set versions in the README
  • Updated the build steps to not forget that in the future
  • Switched U+1F41E LADY BEETLE to use :ladybug:/:lady_beetle: as a short code (:beetle: is now used by U+1FAB2 BEETLE)
  • Codepoint U+1F46A FAMILY now only has the shortcode :family:, as it is no longer considered gendered (previous also had :man-woman-boy:)
  • Sequence 1F468-200D-1F469-200D-1F466 now only has the shortcode man-woman-boy (previously had :family:)
  • Codepoint U+1F935 MANY IN TUXEDO now has the shortcode :person_in_tuxedo: (since :man_in_tuxedo: is used by sequence 1F935*-200D-2642-FE0F. The Emoji standard and the Unicode standard appear to disagree here, but this choice seems reasonable)
  • Codepoint U+1F46B MAN AND WOMAN HOLDING HANDS now has :couple: as a secondary shortcode, rather than the primary
  • Added names for all sequences (fixes #180)

2020-10-09 : v6.0.0

  • Updated to Unicode/Emoji 13.0
  • Updated Android images to v2020-07-22-unicode13_0
  • Updated Twemoji images to v13.0.1
  • Updated Facebook images to latest
  • Updated Apple images to Mac OS 11 Beta 20A5384c
    • The mixed skin tone couples are broken in this beta font, so I'm using those 60 images from 10.15 instead

2020-01-14 : v5.0.1

2020-01-10 : v5.0.0

  • Updated to Unicode v12.1
  • Updated Apple images to macOS 10.15.1
  • Updated Twemoji images to v12.1.4
  • Updated Android images to v2019-11-19-unicode12
  • Updated Facebook images to v9 / EMOJI_3
  • Removed Messenger images (now unified with Facebook)
  • Changed the added_in field to specify Emoji spec version rather than Unicode version (the underlying Unicode data changed)
  • Support for emoji with multiple skin tones within a single emoji

2018-07-05 : v4.1.0

  • Removed EmojiOne at the request of EmojiOne/JoyPixels staff

2018-04-16 : v4.0.4

2017-12-20 : v4.0.3

2017-12-15 : v4.0.2

  • Added added_in property for variations https://github.com/iamcal/emoji-data/pull/101
  • Updated the preferred short codes for the following emoji to more natural CLDR shortnames:
    • Emoji v4: 1F91E, 1F936, 2695
    • Emoji v5: 1F928, 1F929, 1F92A, 1F92B, 1F92C, 1F92D, 1F92E, 1F92F

2017-12-07 : v4.0.1

2017-11-17 : v4.0.0

  • Updated to Unicode 10 / Emoji 5
  • Changed the unified codepoints to prefer the fully qualified version (with -FE0F), including the non-qualified version as an optional property
  • Correctly handle skin-variation codepoints that have been obsoleted
  • Added gaps between images in spritesheets to avoid bleed when displaying them zoomed - a 1px border around each image at all sizes
  • Added real names for flags
  • Added obsolete information for skin variations
  • For obsolete emoji missing images, the sheets now use the image of the emoji it was obsoleted by
  • Corrected softbank codepoints
  • Better formating of table.htm to show which images are available

2017-05-08 : v3.0.0

2017-05-06 : v2.5.2

  • Fixed npm packaging

2017-05-05 : v.2.5.1

  • Include all fallback images in every sheet, including skin tones. This allows sheet consumers to only include the sheets they want to use, without requiring the apple ones for fallback.

2017-05-04 : v2.5.0

  • Upgraded maps to Unicode 9 / Emoji 4
  • Made the kissing emoticons (e.g. :*) result in kissing_heart instead of kiss https://github.com/iamcal/emoji-data/pull/73
  • Switched U+1F373 COOKING to use :cooking:/:fried_egg: as a short code (:egg: is now used by U+1F95A EGG)
  • Added support for Facebook and FB Messenger images https://github.com/iamcal/emoji-data/pull/76
  • Switched skin tone variations to be keyed by skintone codepoint, not full composite sequence.
  • Added obsoletes/obsoleted_by fields.
  • Added added_in field to show Unicode version source.

2016-11-11 : v2.4.5

2016-06-17 : v2.4.4

  • Include categories for all codepoints
  • Added bower.json
  • Optimize all images using multiple tools
  • Added indexed color sheets
  • Updated Apple images to match 10.11.5:
    • Removed skin tones for U+1F3C7 (Horse Racing)
    • Added skin tones for U+1F575 (Sluth or Spy)
    • Shortened the height of U+1F579 (Joystick) so it has some headroom

2016-06-01 : v2.4.3

  • Fixed shortnames for snowman (U+2603 & U+26C4)
  • Added missing -FE0F variants for OS X/iOS
  • Changed how we package for NPM

2016-05-12 : v2.4.2

  • Changed :) to :slightly_smiling_face:
  • Support for capitalized open_mouth emoticons
  • Started processing the emoji 2.0 data files
  • Added skin tones for U+1F575 (sluth/spy) - no Apple images yet
  • Fixed the duplicate :umbrella: short names
  • Added U+23CF (Eject symbol) - no Apple image yet

2016-04-20 : v2.4.1

  • Fixed the duplicate :satellite: short names

2016-02-09 : v2.4.0

  • Updated emojione images to the Q1 2016 release (v2.1.0)

2015-12-11 : v2.3.0

  • Updated Google images to Android 6.0.1
  • Updated Twitter images to include skin tones

2015-11-05 : v2.2.2

  • Fixed :lightning: names
  • Added :man-woman-boy: back as an alias

2015-11-04 : v2.2.1

  • Fixed :scorpion: name
  • Removed the duplicate family emoji

2015-10-22 : v2.2.0

  • Updated to OS X 10.11.1 final, with lots of new emoji

2015-09-16 : v2.1.0

  • Updated to OS X 10.11 beta, added new flags and spock emoji

2015-05-28 : v2.0.0

  • First tagged version
  • Tracking new iOS 8 skin-tone emoji