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