-
open your browser and go to
https://www.facebook.com/friends/list -
scroll down until the page finishes loading all of your friends. (Keep scrolling until you reach the bottom.)
-
open the developer console
- Chrome / Edge:
Ctrl+Shift+JorF12→ Console tab - Firefox:
Ctrl+Shift+K - Safari:
Cmd+Option+C
- Chrome / Edge:
Note
some browsers require you to allow pasting into the console first.
if prompted, type allow pasting and press Enter.
- copy the JavaScript code below and paste it into the console, then press Enter:
expand code
triple click and CTRL + C to copy
this is minified so that it can be copied easily, use a beautifier if you're curious what it does.
!function(){let e=Array.from(document.querySelectorAll('[data-visualcompletion="ignore-dynamic"]')).reduce((e,t)=>{let a=t.querySelector('svg[data-visualcompletion="ignore-dynamic"]')?.getAttribute("aria-label"),o=t?.getElementsByTagName("a")[0]?.getAttribute("href");return a&&o&&e.push({name:a,url:o}),e},[]);if(!e)return console.error("No data found");let t=prompt("Choose an option:\n1 – Show data as table\n2 – Download JSON file\n3 – Do both");if(!t||isNaN(+t))return console.error("Invalid action");if("1"===t)console.table(e);else if("2"===t||"3"===t){"3"===t&&console.table(e);let a=JSON.stringify(e,null,2),o=new Blob([a],{type:"application/json"}),n=URL.createObjectURL(o),r=document.createElement("a");r.href=n,r.download="facebook_friends.json",document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)}}();- MIT License