Skip to content

Instantly share code, notes, and snippets.

@timvisee
Last active June 4, 2026 20:18
Show Gist options
  • Select an option

  • Save timvisee/55efa2a603c90ff1254905373258d490 to your computer and use it in GitHub Desktop.

Select an option

Save timvisee/55efa2a603c90ff1254905373258d490 to your computer and use it in GitHub Desktop.
Get a list of subreddits you're subscribed to on reddit. https://timvisee.com/blog/list-export-your-subreddits/

As posted on: https://timvisee.com/blog/list-export-your-subreddits/

Get a list of your subreddits

To obtain a list of your subreddits, do the following:

  • First make sure you're logged in on reddit, on a desktop browser.

  • Then visit reddit.com/subreddits.

  • Then put the following snippet in your browsers address bar, and press Enter.
    Make sure javascript: is included at the beginning, your browser might remove it while copy-pasting for security reasons:

    javascript:$('body').replaceWith('<body>'+$('.subscription-box').find('li').find('a.title').map((_, d) => $(d).text()).get().join("<br>")+'</body>');javascript.void()
  • The reddit page is replaced with a list of all the subreddits you're subscribed to.

For nerds

Here is the expanded snippet:

// Build a list of subreddits with break lines between them
var subs = $('.subscription-box')
    .find('li')
    .find('a.title')
    .map((_, d) => $(d).text())
    .get()
    .join("<br>"));

// Replace the page with a list of subreddits
$('body').replaceWith('<body>' + subs +'</body>');

javascript.void()

It finds all items from the subreddit list in the sidebar on the page, and builds an array of subreddit names from it. The array is concatinated with breaklines. The page is then replaced with this list.

@k9gardner

Copy link
Copy Markdown

But these aren't selectable links. I guess no one ever thought of putting it in, say, my account profile? Something like "My subreddits", you know?

@adam-pearson

Copy link
Copy Markdown

@k9gardner if you want a selectable list of links just change it to this:

javascript:$('body').replaceWith('<body>'+$('.subscription-box').find('li').find('a.title').map((_, d) => "<a href='https://www.reddit.com/r/" + $(d).text() + "'>" + $(d).text()).get().join("</a><br>")+'</body>');javascript.void()

@cdreue

cdreue commented Dec 30, 2021

Copy link
Copy Markdown

Is it possible to find the date you joined a subreddit?

@clmbmb

clmbmb commented Feb 20, 2023

Copy link
Copy Markdown

I don't think this works anymore. I tried it with two users/accounts and neither works. One account with 18 subs and another with 70+.

@RebootedDuck

RebootedDuck commented Mar 6, 2023

Copy link
Copy Markdown

@clmbmb

I don't think this works anymore. I tried it with two users/accounts and neither works. One account with 18 subs and another with 70+.

It needs to be done in the browser dev tools on https://old.reddit.com/subreddits/mine

@PMCJTM

PMCJTM commented Jun 6, 2023

Copy link
Copy Markdown

If anyone just wants a list of links, this should work

javascript:$('body').replaceWith('<body>'+$('.subscription-box').find('li').find('a.title').map((_, d) => "https://www.reddit.com/r/" + $(d).text()).get().join("<br>")+'</body>');javascript.void()

@hackgrid

hackgrid commented Jul 1, 2023

Copy link
Copy Markdown

You guys don't give the correct URL for followed user accounts!

  1. Go to https://old.reddit.com/subreddits/mine
  2. Open Web developers tools / javascript console
  3. Execute following code:

a) select ALL subreddits

javascript:$('body').replaceWith('<body>'+$('.subscription-box').find('li').find('a.title').map((_, d) => $(d).attr('href').replace('old.','')).get().join("<br>")+'</body>');javascript.void()

b) select ONLY NSFW subreddits

javascript:$('body').replaceWith('<body>'+$('.subscription-box').find('li').has('span.sr-type-icon-nsfw').find('a.title').map((_, d) => $(d).attr('href').replace('old.','')).get().join("<br>")+'</body>');javascript.void()

c) select WITHOUT NSFW subreddits

javascript:$('body').replaceWith('<body>'+$('.subscription-box').find('li').not(':has(span.sr-type-icon-nsfw)').find('a.title').map((_, d) => $(d).attr('href').replace('old.','')).get().join("<br>")+'</body>');javascript.void()

If you want the old.reddit-Links, you can remove the .replace('old.','') parts.

@jhoek

jhoek commented Aug 20, 2025

Copy link
Copy Markdown

@timvisee Would you happen to be aware of something similar for retrieving ones multireddits? :-)

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