Skip to content

Instantly share code, notes, and snippets.

@MarvNC
Last active July 29, 2025 04:52
Show Gist options
  • Save MarvNC/e601f3603df22f36ebd3102c501116c6 to your computer and use it in GitHub Desktop.
Save MarvNC/e601f3603df22f36ebd3102c501116c6 to your computer and use it in GitHub Desktop.
How to Get Your Discord Token From the Browser Developer Console

How to Get Your Discord Token From the Browser Console

New method (contributed by youyoumu)

  • Open the browser console with F12 or Ctrl + Shift + I.
  • Enable mobile device emulation with Ctrl + Shift + M.
  • Paste the following code into the console and press Enter:
const iframe = document.createElement('iframe');
console.log(
  'Token: %c%s',
  'font-size:16px;',
  JSON.parse(document.body.appendChild(iframe).contentWindow.localStorage.token)
);
iframe.remove();

Alternatively, you can just go to the Application tab, then Local Storage, and find the token key under https://discord.com/ after you have enabled mobile device emulation.

Old method

Click to expand
  • Open the browser console with F12 or Ctrl + Shift + I.
  • Go to the network tab
  • Filter by Fetch/XHR
  • Choose a request that isn't an error (if there aren't any, click on a channel or server to trigger some requests.)
  • You'll find your discord token under the request headers -> authorization section. Copy and paste it from there.

image

@deltaxsingh
Copy link

const iframe = document.createElement("iframe");
console.log(
  "Token: %c%s",
  "font-size:16px;",
  JSON.parse(
    document.body.appendChild(iframe).contentWindow.localStorage.token,
  ),
);
iframe.remove();

Hell yeah thanks!

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