Skip to content

Instantly share code, notes, and snippets.

@XielQs
Last active June 28, 2025 12:30
Show Gist options
  • Save XielQs/90ab13b0c61c6888dae329199ea6aff3 to your computer and use it in GitHub Desktop.
Save XielQs/90ab13b0c61c6888dae329199ea6aff3 to your computer and use it in GitHub Desktop.
Get self discord token using console

How to get your discord token using browser console

  1. Open developer tools in browser (if you using desktop app use Ctrl+Shift+I shortcut)
  2. Switch current tab to Console
  3. Write this code and press enter
// old, not working anymore
(webpackChunkdiscord_app.push([[''],{},e=>{m=[];for(let c in e.c)m.push(e.c[c])}]),m).find(m=>m?.exports?.default?.getToken!==void 0).exports.default.getToken()
// new
iframe=document.createElement('iframe'),document.body.append(iframe),console.log('Your Discord token is %c%s','font-size:14px;',JSON.parse(iframe.contentWindow.localStorage.token)),iframe.remove()

It will print out your Discord token!

@devjanger
Copy link

thx

@youyoumu
Copy link

youyoumu commented Jun 28, 2025

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

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