<?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>Forem: sunny kumar</title>
    <description>The latest articles on Forem by sunny kumar (@sunnyanjan).</description>
    <link>https://forem.com/sunnyanjan</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3847933%2Ff9e5b70c-e902-4472-a330-f752b90fc7e4.jpg</url>
      <title>Forem: sunny kumar</title>
      <link>https://forem.com/sunnyanjan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sunnyanjan"/>
    <language>en</language>
    <item>
      <title>I got tired of ad-heavy JSON formatters so I built my own — here's what I learned</title>
      <dc:creator>sunny kumar</dc:creator>
      <pubDate>Sat, 28 Mar 2026 16:16:25 +0000</pubDate>
      <link>https://forem.com/sunnyanjan/i-got-tired-of-ad-heavy-json-formatters-so-i-built-my-own-heres-what-i-learned-30n</link>
      <guid>https://forem.com/sunnyanjan/i-got-tired-of-ad-heavy-json-formatters-so-i-built-my-own-heres-what-i-learned-30n</guid>
      <description>&lt;p&gt;I use JSON formatters every day. Paste messy API response, get clean output. Simple.&lt;br&gt;
But every tool I used was either covered in ads, required signup, or sent my data to some server I knew nothing about. One day I was pasting an API key into one of these tools and stopped myself - why am I trusting a random website with this?&lt;br&gt;
So I built my own: &lt;strong&gt;getpdfmint.com/tools/json-formatter&lt;/strong&gt;&lt;br&gt;
What it does differently&lt;br&gt;
Everything runs in the browser. No server, no logs, no account. You can paste API keys, internal configs, production data — nothing leaves your machine.&lt;br&gt;
It also tells you exactly where your JSON is broken. Not just "invalid JSON" - the exact line and character. Trailing comma on line 47? It'll find it.&lt;br&gt;
&lt;strong&gt;Auto-fix&lt;/strong&gt;&lt;br&gt;
This is the part I'm most proud of. Most formatters tell you your JSON is broken and leave you to figure it out. Auto-fix actually tries to repair it - single quotes swapped to double quotes, unquoted keys wrapped, trailing commas stripped, missing brackets closed. One click and it tries everything it can before giving up.&lt;br&gt;
It won't fix everything. Deeply malformed JSON sometimes can't be recovered automatically. But for the 90% of cases where someone copy-pasted from JavaScript or a Slack message, it just works.&lt;br&gt;
&lt;strong&gt;Schema fix&lt;/strong&gt;&lt;br&gt;
This one is for when your JSON is technically valid but the types are wrong. Classic example: your API returns {"port": "8080", "retries": "3"} - valid JSON, but both values should be numbers, not strings. Schema fix detects string-wrapped numbers and booleans and converts them to their proper types automatically.&lt;br&gt;
It's a small thing but it saves a surprising amount of time when you're debugging why your config isn't being read correctly.&lt;br&gt;
What I learned building it&lt;br&gt;
Syntax highlighting without a library is surprisingly doable with a regex pass over the output. The hard part is error recovery - JSON.parse throws one error and stops. Building something that keeps trying, finds multiple issues, and explains them in plain English took most of the time.&lt;br&gt;
The auto-fix logic is essentially a series of educated guesses applied in order, each one checked against JSON.parse until something passes. Ugly but effective.&lt;br&gt;
The other thing: people paste enormous JSON. Files that would choke a server-side tool work fine because the browser has plenty of memory and no upload limit.&lt;br&gt;
It's free, forever&lt;br&gt;
No ads on the tool pages. No signup. It runs on goodwill - there's a support button if you find it useful, but no pressure.&lt;br&gt;
If you work with JSON daily, give it a try. And if you build something similar, the client-side approach is worth considering.&lt;/p&gt;

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