6 developer tools for regex, JWT, UUID and JSON
On 2 July 2019 at 13:42 UTC, Cloudflare went dark. Not a data centre, not a region — the whole edge, everywhere, for 27 minutes, taking a large slice of the web down with it.
The cause was one line in a firewall rule: a regular expression containing nested wildcards. Against ordinary traffic it was fine. Against the wrong string it fell into catastrophic backtracking and pinned the CPU — and with millions of requests a second passing through it, there were millions of chances every second to find that string. The rule went to every server on the planet at once with no staged rollout, and the CPU guard that would have caught it had been removed during an earlier refactor.
Nothing about that failure was architectural. It was a detail, in a field, that nobody had a convenient way to check.
Six of the tools here are for details of exactly that kind.
1. A regex is a program, and it can hang
The dangerous shape is a quantifier inside a quantifier — (a+)+, (\s*)*, (.*)* — pointed at input that ultimately fails to match. The engine has to try every way of dividing the string between the inner and outer repetition before it can conclude there is no match, and the number of ways doubles with every extra character.
That doubling is what makes it so hard to catch. Twenty characters is a millisecond. Thirty is eleven seconds. Thirty-five is nearly six minutes, on one core, for one request. Every test you wrote passed, because you never happened to type the string that has no match.
Two defences. Do not put a quantifier inside a quantifier when the input length is not bounded — and when you are experimenting with a pattern, run it somewhere it cannot take the main thread with it. Regex Tester does the second by default: it evaluates in a worker, so a runaway expression burns a background thread instead of freezing the page you are working in.
2. Decoding a JWT is not verifying it
A JWT is three base64url segments joined by dots. Here is a real one, pulled apart:
header eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
→ {"alg":"HS256","typ":"JWT"}
payload eyJzdWIiOiIxMjMiLCJyb2xlIjoiYWRtaW4iLCJleHAiOjE3ODkwMDAwMDB9
→ {"sub":"123","role":"admin","exp":1789000000}
signature f1uwpBxw3uNoagO2-ILleojVBdX1gTm-M9jzQqR8qtg
Base64url is an encoding, not encryption. Anyone holding that token can read every claim in it in about a second — the user id, the role, the tenant, the plan, whatever you put in there. The signature does not conceal the payload. It only proves the payload has not been edited since it was signed.
Two things follow, and both get missed:
- Nothing secret goes in a JWT payload. It is readable by anyone who has the token, including the browser it was issued to.
- Reading the claims and trusting the claims are different operations. Verification needs the key and is a separate step. Code that only decodes will cheerfully hand you a token an attacker wrote themselves.
JWT Decoder reads every claim and shows when it expires — and then verifies the signature against a secret or a public key, which is the half that actually decides anything.
3. UUIDv4 is the wrong default for a primary key
A v4 UUID is 122 bits of randomness. Excellent for uniqueness, and unhelpful for a B-tree index: every insert lands in a random place in the tree, so pages split constantly and the index bloats. Benchmarks put random-UUID inserts around 2–3× slower than sequential keys at scale in Postgres, and MySQL/InnoDB indexes 30–60% larger on disk.
UUIDv7, standardised in RFC 9562 in 2024, puts a millisecond Unix timestamp in the high bits. Still a UUID, still unique, still safe to generate on any machine without coordination — but roughly monotonic, so new rows land next to each other and the index behaves much more like a sequential key.
A workable default:
- v7 for anything that will be a primary key
- v4 when the ID must leak no ordering or timing information
- v5 when the ID has to be derived deterministically from a name
UUID Generator does all three in bulk from the browser's cryptographic random source, and reads back the ones you already have so you can see which version you are actually running.
4. JSON that parses is not JSON that is right
JSON.parse has one opinion about a document: it either throws or it does not. It will not tell you that a config file names the same key twice — it quietly keeps the last one, so the setting you are looking at on line 12 is not the setting that runs. And "valid JSON" is rarely the question anyway. The question is whether the payload is the shape the other side promised: the field is present, the number is a number, the enum value is one of the allowed ones.
JSON Validator answers both. It points at a syntax error by line and column, flags duplicate keys a parser hides, and checks the document against a JSON Schema when you paste one underneath. If the document is fine and merely unreadable, JSON Formatter is the quicker stop.
5 and 6. The unglamorous two
Markup Validator checks HTML against forty conformance and accessibility rules, and gives every finding a line, a column and the markup that caused it. Most accessibility failures are not hard problems; they are a missing attribute nobody looked for.
JSON to CSV flattens JSON or NDJSON into a spreadsheet-ready CSV, turning nested objects into dotted columns instead of dropping them. It exists for the recurring moment when someone who does not have your API asks for the data anyway.
Two more belong on the same shelf. SQL Formatter lays a query out one clause per line without touching what is inside its strings, which is how a missing join condition becomes visible. And before markup, CSS or JavaScript ships, HTML, CSS & JS Minifier minifies it safely and measures the real gzip saving instead of estimating it.
One more detail with a date on it: certificates
This one has no tool here, but it belongs in the same list. The CA/Browser Forum approved ballot SC-081v3 in April 2025 — 29 votes in favour, none against. The maximum lifetime of a TLS certificate steps down from the old 398-day ceiling to 200 days from 15 March 2026, 100 days from March 2027, and 47 days from March 2029.
The 200-day rule is already in force. If any part of your renewal process is a calendar reminder and a human being, it has half the runway it had a year ago, and will have a quarter of it by 2029. At 47 days, renewing by hand is not a process — it is a scheduled outage. The fix is not a better reminder; it is automated renewal through your certificate authority's ACME client or your host's managed certificates.
The common thread
None of these are hard concepts. A pattern with a quantifier in the wrong place, a token that was read but never checked, an ID that indexes badly, a duplicate key nobody saw, a certificate with a date on it. Each one is invisible right up to the moment it is the only thing anyone is talking about — and most take about thirty seconds to check, if you have somewhere to check it.
All six tools run in your browser. The token, the schema and the payload stay on your machine.
For the formats on the other side of the API — CSV, spreadsheets, Markdown and the rest — see 14 tools for writing, text and documents.
Browse the full tool directory →
0 comments
No comments yet. Be the first to say something.