Sunday, June 14, 2026
HomeLanguagesConvert emoji into text in Python

Convert emoji into text in Python

Converting emoticons or emojis into text in Python can be done using the demoji module. It is used to accurately remove and replace emojis in text strings. To install the demoji module the below command can be used: 
 

pip install demoji

The demoji module also requires an initial download of data from the Unicode Consortium’s emoji code repository as the emoji list itself is frequently updated and changed. The below code block should be used for the above-mentioned download: 
 

Python3




import demoji
 
demoji.download_codes()


Output: 
 

Now that we are all set to use the demoji module we can jump into a few examples.
Example 1:
 

Output: 
 

Example 2:
 

Output: 
 

Example 3: 
 

Output: 
 

Example 4: 
 

Output: 
 

 

RELATED ARTICLES

1 COMMENT

Most Popular

Dominic
32515 POSTS0 COMMENTS
Milvus
131 POSTS0 COMMENTS
Nango Kala
6897 POSTS0 COMMENTS
Nicole Veronica
12013 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12109 POSTS0 COMMENTS
Shaida Kate Naidoo
7019 POSTS0 COMMENTS
Ted Musemwa
7262 POSTS0 COMMENTS
Thapelo Manthata
6976 POSTS0 COMMENTS
Umr Jansen
6964 POSTS0 COMMENTS