DEV Community

Expeditious Tools
Expeditious Tools

Posted on AI-assisted

Online Developer Tools Worth Knowing, and Where They Fall Short

A lot of a developer's day isn't spent writing features. It goes to the small jobs around the code: reading an API response that arrives as one unbroken line, working out why a request fails because of one unescaped character, checking whether two config files really match, or confirming that a downloaded file wasn't corrupted.

These jobs are small, but they repeat, and doing them by hand is slow and error-prone. Browser-based utilities handle many of them in seconds, as long as you understand what they do and when not to trust them.

This guide covers the tools in four groups: reading and debugging data, encoding and hashing, generating and testing, and infrastructure and media. It ends with how to judge whether a tool is safe to use.

Part 1: Reading and Debugging Data
JSON Formatter and Validator

Take this payload, which would come back as a single line in a real response:

json
{"user": {"id": 101, "name": "Dev" "active": true}}

Parsing it with JSON.parse() gives an error like:

SyntaxError: Expected ',' or '}' after property value in JSON at position 35
Enter fullscreen mode Exit fullscreen mode

(The wording differs between browsers and Node, but the idea is the same.) The error points at "active", where the parser gave up. The actual mistake is the missing comma after "Dev", just before that point. In a 40-character string this is easy to see. In a 6,000-character response with nested arrays, it isn't. A validator that highlights the failing line and a formatter that indents the structure make it visible at once:

json
{
  "user": {
    "id": 101,
    "name": "Dev",
    "active": true
  }
}
Enter fullscreen mode Exit fullscreen mode

Three other mistakes commonly turn up in hand-edited JSON, especially config files:

Trailing commas, which are legal in JavaScript but not in JSON.
Single quotes instead of double quotes.
Comments, which standard JSON doesn't allow.

A validator catches all of these before you deploy a broken config.

Text Difference Checker

Suppose a staging server and a production server return slightly different responses for the same request. Neither response is in a Git repository, so git diff doesn't help. Pasting both into a diff checker shows the changed lines immediately.

Diff tools are also good at finding invisible differences, such as trailing whitespace, tabs versus spaces, or Windows (CRLF) versus Unix (LF) line endings. These cause config problems that look identical on screen.

A visual diff doesn't replace Git. Git records history, authorship, and branches. A diff checker only answers "how do these two texts differ right now?", which is often all you need for a quick check.

CSS and JavaScript Beautifiers

Minified code is written for browsers, not people. A beautifier restores indentation and line breaks, so you can read a third-party script or a production CSS bundle.

It has limits. Minifiers rename variables to short names like a, b, and t, and a beautifier can't restore the original names. For your own code, source maps give much better results. A beautifier is for code you don't have the source for.

Don't confuse a beautifier with a linter. A beautifier changes how code looks. A linter analyzes it and flags problems such as unused variables or suspicious comparisons. One doesn't do the other's job.

Part 2: Encoding and Hashing
Base64 Encoder and Decoder

Base64 turns binary data into plain ASCII text. You'll see it in data URLs, email attachments, API payloads, HTTP Basic authentication headers, and JWTs.

The most important thing to understand is that Base64 is encoding, not encryption. There's no key and no secret. Anyone holding the string can decode it, so it never hides anything.

The browser's btoa() function only handles characters in the Latin-1 range. Passing it emoji or non-Latin text throws an error:

javascript
btoa("Hello 👋"); // InvalidCharacterError

The fix is to convert the string to UTF-8 bytes first:

javascript
function toBase64(text) {
    const bytes = new TextEncoder().encode(text);
    let binary = "";
    bytes.forEach(byte => (binary += String.fromCharCode(byte)));
    return btoa(binary);
}

function fromBase64(base64) {
    const binary = atob(base64);
    const bytes = Uint8Array.from(binary, char => char.charCodeAt(0));
    return new TextDecoder().decode(bytes);
}

const encoded = toBase64("Hello 👋 

Enter fullscreen mode Exit fullscreen mode
");
console.log(encoded);
console.log(fromBase64(encoded)); // Hello 👋 
Enter fullscreen mode Exit fullscreen mode

JWTs use a variant called Base64URL, which replaces + and / with - and _ and drops the = padding. If a standard decoder fails on a token, that's usually why.

URL Encoder and Decoder

Reserved characters in a URL have meaning. If a query value contains one, the server reads it as structure rather than data:

/search?q=tools & tips

Here the server sees q=tools and then a separate, empty parameter named tips. Encoding the value fixes it:

javascript
const value = "tools & tips";
const url = `/search?q=${encodeURIComponent(value)}`;
console.log(url); // /search?q=tools%20%26%20tips
Enter fullscreen mode Exit fullscreen mode

The two built-in functions behave differently:

Function Meant for Leaves these alone
encodeURI() A complete URL : / ? # & = and similar
encodeURIComponent() One piece, such as a parameter value Only letters, digits, and - _ . ! ~ * ' ( )

Using encodeURI() on a single value is a common mistake, because it leaves & and = untouched and the query string breaks. One more detail: HTML form encoding writes spaces as +, while encodeURIComponent() writes %20. Most servers accept both, but not all.

MD5 and SHA Hash Generators

A hash function turns any input into a fixed-length fingerprint. The same input always gives the same output, and a tiny change gives a completely different one.

javascript
async function generateSHA256(message) {
    const data = new TextEncoder().encode(message);
    const hashBuffer = await crypto.subtle.digest("SHA-256", data);
    return Array.from(new Uint8Array(hashBuffer))
        .map(byte => byte.toString(16).padStart(2, "0"))
        .join("");
}

generateSHA256("Hello Developer").then(console.log);
Enter fullscreen mode Exit fullscreen mode

Whether MD5 and SHA-1 are acceptable depends on who might be attacking you:

Catching accidental corruption (a download that was cut off): MD5 or SHA-1 still works, since random errors won't happen to produce a matching hash.
Resisting a deliberate attacker: both are broken. Practical collision attacks exist, meaning someone can craft two different files with the same hash. They shouldn't be used for signatures, certificates, or verifying software from an untrusted source.
SHA-256 is the sensible default today. Note that the Web Crypto API doesn't offer MD5 at all.

To verify a download, hash the file and compare the result with the checksum the publisher lists. If the checksum is hosted on the same server as the file, an attacker who replaced one could replace the other, so ideally get it over a separate trusted channel.

Passwords are a different problem. General-purpose hashes like SHA-256 are designed to be fast, which helps attackers who can try billions of guesses per second. Passwords should be stored with a slow, salted, purpose-built algorithm such as Argon2id or bcrypt, which are deliberately expensive to compute.

Part 3: Generating and Testing
Regular Expression Tester

Regex is hard to get right without feedback. A tester that highlights matches as you type, and shows capture groups, shortens the trial-and-error loop a lot. It's useful for validation, log analysis, extraction, and find-and-replace.

Here is a common email pattern:

javascript
const pattern = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/;
console.log(pattern.test("developer@example.com")); // true
console.log(pattern.test("a@b..com"));              // true, but it's invalid
Enter fullscreen mode Exit fullscreen mode

The second line shows the problem. The pattern checks the general shape of an address, nothing more. It lets through invalid domains like b..com, and it rejects some legal addresses, such as ones with quoted local parts or internationalized characters. Fully validating an email address with regex isn't practical. The reliable method is to send a confirmation message.

Two further cautions:

Engine differences. JavaScript, Python, PCRE, and Java don't support exactly the same features. Lookbehind support, named-group syntax ((?...) versus (?P...)), and flags all vary. Test in an engine that matches your runtime.
ReDoS (regex denial of service). Some patterns take exponential time on certain inputs. The classic example is nested quantifiers:

javascript
const risky = /^(a+)+$/;
risky.test("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!"); // can hang for seconds or longer
Enter fullscreen mode Exit fullscreen mode

When the match fails, a backtracking engine tries a huge number of ways to split the as between the groups. If a pattern like this runs on user input on your server, one crafted request can tie up a CPU. To reduce the risk, avoid nested quantifiers, limit input length, and consider a linear-time engine such as RE2 for untrusted input.

Secure Password Generator

Two rules matter most. Use a cryptographically secure random source (crypto.getRandomValues()), never Math.random(), which is predictable. And choose characters without bias.

The usual shortcut is characters[value % characters.length]. It's biased because a 32-bit random number doesn't divide evenly into most set sizes. With a 70-character set, 2³² leaves a remainder of 46, so the first 46 characters appear slightly more often than the rest. The effect is tiny, but it's easy to remove with rejection sampling: discard any random value that falls in the uneven leftover range.

javascript
function secureRandomInt(max) {
    const limit = Math.floor(0x100000000 / max) * max;
    const buffer = new Uint32Array(1);
    do {
        crypto.getRandomValues(buffer);
    } while (buffer[0] >= limit);
    return buffer[0] % max;
}

function generatePassword(length = 16) {
    const sets = [
        "abcdefghijklmnopqrstuvwxyz",
        "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
        "0123456789",
        "!@#$%^&*"
    ];
    if (length < sets.length) throw new Error("Length too short");

    const all = sets.join("");

    // Guarantee one character from each class
    const chars = sets.map(set => set[secureRandomInt(set.length)]);

    // Fill the rest from the full pool
    while (chars.length < length) {
        chars.push(all[secureRandomInt(all.length)]);
    }

    // Fisher-Yates shuffle so the guaranteed characters aren't always first
    for (let i = chars.length - 1; i > 0; i--) {
        const j = secureRandomInt(i + 1);
        [chars[i], chars[j]] = [chars[j], chars[i]];
    }

    return chars.join("");
}

console.log(generatePassword());
Enter fullscreen mode Exit fullscreen mode

On entropy: a 16-character password drawn uniformly from 70 symbols has about 98 bits (16 × log₂70). Forcing one character from each class slightly reduces that, but it's a reasonable trade if a site demands mixed classes.

Generating a password is only half the job. Store the results in a password manager or secrets vault, not in a note or a source file.

Part 4: Infrastructure and Media
Subnet Calculator

Cloud networking forces you to read CIDR notation. The number after the slash says how many bits identify the network. The remaining bits identify hosts, and a subnet calculator does the arithmetic:

CIDR    Subnet mask Total addresses Usable hosts    Example range
192.168.1.0/24  255.255.255.0   256 254 .1 to .254 (broadcast .255)
10.0.0.0/22 255.255.252.0   1,024   1,022   10.0.0.1 to 10.0.3.254 (broadcast 10.0.3.255)
192.168.1.0/28  255.255.255.240 16  14  .1 to .14 (broadcast .15)
Enter fullscreen mode Exit fullscreen mode

Usable hosts are the total minus two, since the first address is the network address and the last is the broadcast address. Cloud providers often reserve more. AWS, for example, reserves five addresses in every subnet, so a /28 gives you 11 usable addresses there, not 14. A calculator gives you the textbook number, so check your provider's documentation.

The calculator is useful when you're planning VPC ranges, deciding how many subnets fit in a block, or checking that two ranges don't overlap before peering networks.

Image Format Conversion

Users upload whatever their devices produce, and formats differ in what they support:

Format || Strengths || Limitations

JPG || Small files for photos || Lossy, no transparency.

PNG || Lossless, transparency, sharp text and screenshots || Large files for photos.

WebP || Smaller than JPG or PNG at similar quality, supports transparency and animation || Older browsers and some tools lack support.

HEIC || Efficient storage on phones || Not displayed by most browsers, so it usually needs conversion.

In practice, a photo from an iPhone may arrive as HEIC and fail to display in browsers other than Safari. The usual approach is to convert on upload to JPG or WebP. For delivery, WebP is supported by all current major browsers, but if you need to support older environments, the element lets you offer WebP with a JPG or PNG fallback. Use PNG or lossless WebP for logos and screenshots, where lossy compression leaves visible artifacts around text and edges.

Using Online Tools Safely

Pasting data into a website means trusting that website. The key question is where the processing happens.

Browser-side tools run JavaScript on your machine, and your input never needs to leave it. Server-side tools send your input to someone else's server, where it might be logged or stored.

You can check this yourself:

Open your browser's DevTools and go to the Network tab.
Paste some harmless test data and run the tool.
If a request fires carrying your data, the tool is sending it to a server.
As a second check, turn off your network connection. A genuinely client-side tool will keep working.

Even a client-side tool can load analytics or third-party scripts, so this isn't a guarantee. For anything sensitive, use a local alternative. Most of these tasks have one built in:

bash
python -m json.tool response.json      # format and validate JSON
echo -n "text" | base64                # encode
sha256sum file.zip                     # hash a file
Enter fullscreen mode Exit fullscreen mode

Never paste production credentials, private keys, live JWTs, confidential source code, or personal data into a tool you haven't vetted. Check that the site uses HTTPS, look at its privacy policy, and prefer tools that state clearly how they handle your data.

Choosing a Tool

Look for tools that are private, accurate, standards-compliant, reliable, well documented, and actively maintained. Beyond that, understand what the tool does. If you can't tell whether its output is right, such as a hash with the wrong encoding or a regex tested against the wrong engine, you won't notice when it misleads you, and you'll be stuck when the tool isn't available.

Conclusion

JSON validators, encoders, hash generators, regex testers, subnet calculators, and formatters can save a lot of time on repetitive work. But they don't replace understanding. Verify results, learn the reasoning behind each tool, and think about where your data is going before you paste it. The best tools solve one specific problem reliably and fit into the way you already work.

Top comments (0)