Skip to content

Instantly share code, notes, and snippets.

@lmarkus
Last active November 6, 2025 15:30
Show Gist options
  • Save lmarkus/8722f56baf8c47045621 to your computer and use it in GitHub Desktop.
Save lmarkus/8722f56baf8c47045621 to your computer and use it in GitHub Desktop.
Extracting / Exporting custom emoji from Slack

Extracting Emoji From Slack!

Slack doesn't provide an easy way to extract custom emoji from a team. (Especially teams with thousands of custom emoji) This Gist walks you through a relatively simple approach to get your emoji out.

If you're an admin of your own team, you can get the list of emoji directly using this API: https://api.slack.com/methods/emoji.list. Once you have it, skip to Step 3

HOWEVER! This gist is intended for people who don't have admin access, nor access tokens for using that list.

Follow along...

Step 1

Open your Slack team on your browser (I used FireFox in this example)

Next, Open your developer tools, and go to the network tab. Look for a POST request on /emoji.list step1

Step 2

Right Click on the request, and choose to open it in a new tab. step2

This will cause the browser to replay the request, yielding a JSON file with all your emoji information. step3

Save this file somewhere as emoji.json

Step 3

Run download.sh on the file. (Make sure you chmod +x it to make it executable. Details on the download.sh file.

./download.sh emoji.json

Sit back and wait. This will create a folder called output and will save all your emoji to it.

Optional Step 4

To bulk upload your emoji into a new team, use this chrome extension: https://chrome.google.com/webstore/detail/neutral-face-emoji-tools/anchoacphlfbdomdlomnbbfhcmcdmjej

Notes

1- This downloads files sequentially, one at a time. I didn't want to incurr Slack's rage by hammering their edge server with concurrent downloads. 2- This will duplicate aliased emoji

#!/usr/bin/env bash
######
## UPDATE for 2019: I completely changed my approach on how to obtain the emoji dump.
## The new approach results in a JSON file, so the processing is a bit diferent than
## with the previous version. This version will also take care of aliased emoji.
# Use:
# Make this file executable, and feed it the results from the Slack emoji URL dump. Files will be downloaded to `output`
# chmod +x download.sh
# ./download.sh emoji.json
# Input File
INPUT="$1"
# Create output directory where downloaded emoji will be stored
mkdir -p output;
# Clean Up Source File:
# Break up the file into individual lines for processing (Comma and { to NewLine)
# Slack's emoji JSON brings an unwanted escape character "\". We need to remove it.
# We'll also remove unwanted quote marks `"` and curly braces "{" "}"
RAW_LIST=$(cat "${INPUT}" | tr ",{" "\\n" | sed -E 's/[\\"{}]//g')
# Separate into Custom Emoji (Ignoring slack's default ones) and Aliases
# Filter for custom emoji (ie: Anything on emoji.slack-edge.com), and remove the ":" separator
EMOJI_LIST=$( echo "${RAW_LIST}" | grep "https://emoji.slack-edge.com" | sed 's/:https/ https/')
# Filter for the aliases, and remove the separator
ALIAS_LIST=$( echo "${RAW_LIST}" | grep ":alias:" | sed 's/:alias:/ /' )
# First download all the emoji
echo "${EMOJI_LIST}" |
while read -r line || [[ -n "$line" ]]; do
parts=($line)
url=${parts[1]}
name=${parts[0]}
extension=${url##*.}
echo "Downloading ${name}.${extension}"
curl -s -o "output/${name}.${extension}" "${url}"
done;
# Now duplicate all the aliases
echo "${ALIAS_LIST}" |
while read -r line || [[ -n "$line" ]]; do
parts=($line)
alias=${parts[0]}
source=${parts[1]}
target=$(echo "${EMOJI_LIST}" | grep "${source} ")
extension=${target##*.}
echo "Looking for source of ${alias} in ${source} -> ${target}"
echo "copying output/${source}.${extension} to output/${alias}.${extension}"
cp "output/${source}.${extension}" "output/${alias}.${extension}"
done;
@jjnunogarcia
Copy link

Very quick solution in ruby

require 'json'
require 'down'
require 'fileutils'

file = File.read('./emojis.json')
data = JSON.parse(file)

data['emoji'].each do |child|
    url = child['url']
    extension = File.extname(URI.parse(url).path)
    outputFile = "./emojis/#{child['name']}#{extension}";
    puts "Downloading #{url} into #{outputFile}";
    tempfile = Down.download(url)
    FileUtils.mv(tempfile.path, outputFile)
end

@jaynetics
Copy link

faster ruby script that uses a single http connection and does not require external dependencies. adapted from the one above.

require 'fileutils'
require 'json'
require 'net/http'

file = File.read('./emojis.json')
data = JSON.parse(file)
emojis = data.is_a?(Array) ? data : data.fetch('emoji')

FileUtils.mkdir_p('./emojis')

host = URI.parse(emojis.dig(0, 'url') || fail('no emojis or no url')).host

Net::HTTP.start(host, use_ssl: true) do |http|
  emojis.each do |emoji|
    path = URI.parse(emoji['url']).path
    extension = File.extname(path)
    output_path = "./emojis/#{emoji['name']}#{extension}"
    puts "Downloading #{path} into #{output_path}"
    response = http.get(path)
    File.write(output_path, response.body)
  end
end

@h1bay1
Copy link

h1bay1 commented Mar 21, 2023

I've been developing a Slack app to make Emoji wrangling easier in Slack which is now in the Slack app marketplace.

https://emojibox.app

I've just finished an export feature via the official Slack API for those who don't wish to do anything custom 😄 feel free to add it to your workspace and give it a go 😊 Keen for feedback!

Export

@statico
Copy link

statico commented Mar 21, 2023

Very cool! I'll give it a try

@labynocle
Copy link

if needed, I created a tiny go project to download/backup all your custom emojis from a given slack space :)

@h1bay1
Copy link

h1bay1 commented Sep 5, 2023

Been pondering this problem a bit more and have since found an even easier way. It relies on Slack Connect and using EmojiBox.

Slack connect lets you instantly add emojis from one workspace to another by right clicking them.

Steps go like this.
Step 1: Create a slack connect channel between the 2 workspaces
Step 2: Invite yourself to the channel in the second workspace.
Step 3: Accept the invite
Step 4: Install EmojiBox in the app store if you haven’t already and add @EmojiBox from the old workspace to the slack connect channel.
Step 5: Type “@EmojiBox show all” (and hold onto something cause this logs out all your emojis)
Step 6: Right click any emoji you want in your new workspace and they’ll be instantly added.
Step 7: Archive the slack connect channel once your done.

🔥

@OJFord
Copy link

OJFord commented Sep 12, 2025

For the emoji.adminList pages (scroll through to get them all, you don't have to be an admin despite the name) in customize emoji:

#!/usr/bin/env bash
set -eEuo pipefail
file="$1"

mkdir -p output

jq -c '.emoji.[]' "$file" | while read -r obj; do
  name="$(jq -r '.name' <<<"$obj")"
  url="$(jq -r '.url' <<<"$obj")"
  ext="${url##*.}"
  curl -s "$url" -o "output/$name.$ext"
done

(the OP snippet was saving them all over the top of each other as (literally) 'url.png', 'url.gif', etc.)

@rutgoff
Copy link

rutgoff commented Oct 3, 2025

For those coming here in 2025 who aren't admins, here is a low code method which I found easier. You'll need jq, wget

  • Go to the emoji customization page for the relevant workspace; you can get to the general customization page directly from Slack; if you aren't an admin of some kind you'll likely be brought to the Custom emoji page to begin with.
  • Open Web Developer tools in your browser and ensure you're on the Network section
  • Refresh the page
  • Slowly scroll to the bottom
  • Pause recording in the Network list in Web Developer tools
  • Filter the Network list in Web Developer tools to show only emoji.slack-edge.com entries
  • Right-click any line and choose Save All as HAR; the downloaded file is a JSON file with all the emoji URL's in it.
  • Now download the files:
    • Parse the HAR with jq to get JUST the URL's into a file
    • Iterate over that file with wget to download them (whilst also renaming them to add the path part before the filename so you also get the custom names)
    • Rename all the files to the path part, not the random name
    $ cat <wahteveryourcompany/groupis>.slack.com_Archive.har | jq .log.entries[].request.url -r > emoji_list.txt
    $ while read line; do wget $line -w2 --random-wait -O "$(echo $line | cut -d /  -f 5- | tr / _)"; done < emoji_list.txt
    $ for file in *; do ext=.${file##*.}; [ "$ext" = ".$file" ] && ext=""; nostr=${file%%_*}; mv "$file" "$nostr$ext"; done
    

For uploading into Slack, use Chrome + Neutral Face Emoji Tools (be sure to manually upload 1 file first, or that plugin won't show up on the upload page).

@rnhurt
Copy link

rnhurt commented Oct 31, 2025

@rutgoff, thanks for your method. I just tried it and it seemed to work well. I'm not sure I got all of my emoji's but it got the majority of them, so I'm good! ❤️

@FelixAkk
Copy link

FelixAkk commented Nov 6, 2025

Thanks @rutgoff ❤️ your method works well!

For those using fish shell on MacOS:

  • First ensure you have wget with brew reinstall wget
  • Download all the image files
    while read line
        wget $line -w2 --random-wait -O (echo $line | cut -d / -f 5- | tr / _)
    end < emoji_list.txt
    
  • Clean up the names
    for file in *
      set nostr (string split -m 1 _ $file)[1]
      if test "$file" != "$nostr"
          mv "$file" "$nostr"
      end
    end
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment