Developer tool guides
- Check a JavaScript regular expression
A valid JavaScript pattern can still match the wrong text. Flags, groups, replacement, and the one-second stop.
- XML conversion does not expand entities
This XML converter rejects DOCTYPE and ENTITY. It does not fetch or expand an external entity.
- Unix time is seconds or milliseconds
Ten digits are seconds and thirteen are milliseconds. Mixing them moves the date by decades. JWT exp is seconds.
- Count tokens without a model API
o200k_base and cl100k_base count OpenAI tokens locally. Claude and Gemini here are estimates. Chunk overlap is repeated context.
- One JSON object per JSONL line
OpenAI messages JSONL needs one object per line, a messages array, and an assistant message. A blank line is not an example.
- Decoding a JWT does not verify it
A JWT decoder shows the header and payload. It does not check the signature, and alg none means the token is unsigned.
- A JSON sample is not a schema
A schema generated from one sample describes that sample. Validation checks a document, and remote $ref is not loaded.
- A hash is not encryption
MD5 and SHA recompute the same digest from the same text. MD5 has collisions, and Keccak here is not NIST SHA-3.
- Cron: five fields, or six with seconds
Five cron fields run from minute to weekday. Six fields add seconds. Sunday is 0 or 7, and Quartz syntax is rejected.
- Base64 is not URL encoding
Base64 maps bytes to an alphabet. URL encoding percent-escapes characters. A query string needs the second, not the first.
- AES modes, and why DES is old
ECB repeats equal blocks. DES has a 56-bit key and is for old ciphertext. PBKDF2 stretches a password before AES.
- JSON integers past 2^53
Why JSON.parse rounds large integers, and how to keep every digit when you only need to format JSON.