<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: roehler</title>
    <description>The latest articles on DEV Community by roehler (@robinoehler).</description>
    <link>https://dev.to/robinoehler</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4150797%2Ffeffb760-fd0b-439b-a74f-72952c3b352f.jpg</url>
      <title>DEV Community: roehler</title>
      <link>https://dev.to/robinoehler</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/robinoehler"/>
    <language>en</language>
    <item>
      <title>What I learned parsing Instagram, TikTok, X and Facebook data exports in the browser</title>
      <dc:creator>roehler</dc:creator>
      <pubDate>Tue, 29 Sep 2026 18:20:19 +0000</pubDate>
      <link>https://dev.to/robinoehler/what-i-learned-parsing-instagram-tiktok-x-and-facebook-data-exports-in-the-browser-3h0g</link>
      <guid>https://dev.to/robinoehler/what-i-learned-parsing-instagram-tiktok-x-and-facebook-data-exports-in-the-browser-3h0g</guid>
      <description>&lt;p&gt;Most "who unfollowed me" apps want your Instagram password. I wanted a tool that doesn't, so it works with the data export every platform offers instead: you download your data, drop the ZIP into a web page, and it's analyzed locally. The parsers are now open source: &lt;a href="https://github.com/RobinOehler/unfollowtool-export-parsers" rel="noopener noreferrer"&gt;https://github.com/RobinOehler/unfollowtool-export-parsers&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A few things that surprised me:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Instagram's export format changes constantly.&lt;/strong&gt; Since 2020 there have been at least five shapes: a single &lt;code&gt;connections.json&lt;/code&gt;, &lt;code&gt;relationships_followers&lt;/code&gt;, numbered &lt;code&gt;followers_1.json&lt;/code&gt; parts, entries where the username only lives in &lt;code&gt;title&lt;/code&gt; (2024), and &lt;code&gt;label_values&lt;/code&gt; records whose labels are translated into the account's language (2025). The parser identifies fields by value shape and position, never by label.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Meta's JSON is mojibake by design.&lt;/strong&gt; Every UTF-8 byte of a non-ASCII character is written as its own &lt;code&gt;\u00XX&lt;/code&gt; escape, so "José" arrives as "JosÃ©". Decoding means re-assembling the bytes and reading them as UTF-8.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Big ZIPs don't fit in memory.&lt;/strong&gt; Exports that include photos easily reach several GB. Instead of loading the whole archive, the reader parses the ZIP central directory with &lt;code&gt;Blob.slice()&lt;/code&gt; and inflates only the follower files with &lt;code&gt;DecompressionStream('deflate-raw')&lt;/code&gt;, including ZIP64. JSZip remains as a fallback for older browsers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. TikTok TXT files get re-saved as UTF-16.&lt;/strong&gt; Open &lt;code&gt;Follower.txt&lt;/code&gt; in Windows Notepad, click save, and it's UTF-16 with a BOM. Labels like "Username:" are also localized ("Gebruikersnaam:"), so the parser falls back to structure: the date-valued label is the date, the remaining one is the username.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Never trust URLs from the file.&lt;/strong&gt; X's &lt;code&gt;userLink&lt;/code&gt;, Facebook names, HTML anchors: all of it is untrusted input. Entries only get a profile URL that is rebuilt from a validated username or ID on the platform's own host.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. X gives you IDs, Facebook gives you names.&lt;/strong&gt; X archives contain numeric account IDs only (no usernames, no dates); Facebook exports contain display names only. The data model has to allow &lt;code&gt;username: null&lt;/code&gt; and still produce stable keys.&lt;/p&gt;

&lt;p&gt;The whole thing is about 2,900 lines of dependency-free JavaScript with around 250 tests on generated fixtures. It powers &lt;a href="https://www.unfollowtool.com/" rel="noopener noreferrer"&gt;https://www.unfollowtool.com/&lt;/a&gt;, and I'd love issue reports for export layouts it doesn't know yet.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>privacy</category>
      <category>opensource</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
