DEV Community

Muhammad Shoaib
Muhammad Shoaib

Posted on

Small Encoding and Formatting Tasks I Stopped Writing Scripts For

Every developer has a folder of throwaway scripts: decode this Base64 blob, pretty-print that JSON, generate a password for a test account. Most of them are three lines long and get rewritten every few months. Here is the short list of jobs I now do in a browser tab instead, and when I still reach for code.

1. Pretty-printing and validating JSON

API responses copied out of logs are usually one long line. Pasting into a JSON formatter gives indentation and, more usefully, points at the exact position of a trailing comma or unquoted key. If you need the same transformation in CI, jq . is still the right answer, but for a one-off look the browser is faster.

2. Base64 encode / decode

Basic-auth headers, data URIs, JWT payload segments – they are all Base64. A Base64 encoder/decoder is quicker than remembering whether your shell's base64 wants -d or -D. Reminder: Base64 is encoding, not encryption; never treat it as a way to hide secrets.

3. Changing text case

Renaming a batch of constants from camelCase to SNAKE_CASE, or turning a heading into Title Case for docs? A case converter handles the whole block at once.

4. Test passwords

For seed data and local accounts I use a password generator with symbols on and length 16+. For production secrets use your password manager or openssl rand instead.

5. Number bases

Bit flags and colour values come up constantly. The hex calculator and binary calculator do arithmetic directly in those bases, which is handy when checking a mask.

When to keep the script

If the task runs more than once a week, or touches sensitive data, automate it locally. Browser tools are best for the quick, occasional look.

Top comments (0)