Code Tools

JSON, Base64 & Regex Utilities

These three cover the small jobs that eat real time: untangling a minified API response, decoding a Base64 blob to see what is actually inside, and figuring out why a regex does not match. They all run in the tab, so a payload, a token or a customer's log line never leaves your machine.

Which tool for which mess

JSON Formatter is for the one-line response curl hands you and the minified config someone committed. Paste it and it pretty-prints with 2- or 4-space indent, or minifies it back down before you save. It also normalizes whitespace, so reformatting before a commit keeps the diff clean instead of a wall of changed lines.

Base64 is for the middle segment of a JWT when you want to read the claims without a library, data URIs (data:image/png;base64,…), and the occasional blob someone pasted into a ticket. The encoder handles UTF-8 properly — native btoa() throws on anything outside Latin-1, which is what bites people the moment an accented character or emoji shows up.

Regex Tester is for validating input before it reaches a backend, or picking fields out of log lines. Matches and capture groups highlight as you type, and the error text tells you why a pattern is malformed instead of just saying “invalid”.

The things that bite

  • JSON is stricter than JS. Single quotes, trailing commas, unquoted keys and comments are all invalid. Duplicate keys do not error — JSON.parse keeps only the last one.
  • Numbers lose precision. JSON numbers are IEEE-754 doubles, so integers past 2^53 come back rounded when you re-serialize.
  • Base64 has two dialects. URL-safe Base64 swaps + and / for - and _. Feeding one into the other produces garbage with no error.
  • Regex can hang. Nested quantifiers like (a+)+ on a long non-match trigger catastrophic backtracking and freeze the tab.
  • Lookbehind isn't everywhere. (?<=…) works in Chrome but throws in Safari before 16.4, so a pattern that tests fine on your machine may break someone else's.

A typical pass through all three

Pull a response from staging with curl, drop the JSON in the formatter to see its shape, check a field's format against the schema in the regex tester, then Base64-encode a header for the next request. Three tabs of small work, none of it leaving the browser. The one thing to watch: all three are synchronous, so a multi-megabyte JSON payload or a pathological regex will stall the tab — split big inputs first.