Skip to main content



  • fromUnicodeToHexcode(unicode: string, strip?: boolean): Hexcode

  • This function will convert a literal emoji Unicode character into a dash separated hexadecimal codepoint. Unless false is passed as the 2nd argument, zero width joiner's and variation selectors are removed.

    import { fromUnicodeToHexcode } from 'emojibase';

    fromUnicodeToHexcode('๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ'); // 1F468-1F469-1F467-1F466
    fromUnicodeToHexcode('๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ', false); // 1F468-200D-1F469-200D-1F467-200D-1F466