How to Decode JWT Tokens
Learn the structure of JSON Web Tokens, how to decode them safely, and what each claim means.
Practical, in-depth guides covering essential developer topics. Each guide includes clear explanations, code examples, and links to related tools you can use right away.
No guides match — try a different term or category.
Learn the structure of JSON Web Tokens, how to decode them safely, and what each claim means.
Scan code and git history for leaked keys, recognize secret formats, and rotate-then-scrub when one leaks.
btoa/atob, Unicode handling, Node Buffer, URL-safe variant, file encoding — every gotcha.
b64encode, urlsafe variant, bytes vs str, file streaming, padding rules.
Attribute conventions, repeated elements, code in JS/Python/PHP/Java, round-tripping.
Row-to-object mapping, RFC 4180 quoting, type coercion, code in JavaScript and Python.
Infer interfaces from JSON, handle nulls and optionals, quicktype, and the one-sample trap.
Infer a Draft 2020-12 schema from a sample, then tighten it; validate with Ajv and jsonschema.
marked, markdown-it, python-markdown, GFM flavors, and sanitizing against XSS.
UA anatomy, ua-parser-js, Client Hints, Python user-agents, and why not to hand-roll it.
Exact tiktoken counts for GPT, the count_tokens API for Claude, and cost estimation.
LLM tokens explained: words vs tokens, BPE, the ~0.75 words-per-token rule.
The messages format, roles, the weight field, example minimums, and the array trap.
The Bedrock Claude format, the top-level system field, alternation rules, and quotas.
jsdiff, diff-match-patch, manual line walks, unified diff output, whitespace + performance.
difflib (stdlib), Levenshtein, deepdiff, unified diff, ndiff, SequenceMatcher.
Hunk headers, +/- prefixes, context lines, git diff format, applying patches.
Understand when and why to use Base64 encoding, with examples in multiple programming languages.
A complete reference for regular expression syntax with practical examples and common patterns.
What Unix timestamps are, how they work across time zones, and how to convert them in any language.
Best practices for structuring, validating, and formatting JSON in APIs, config files, and data pipelines.
Keyword casing, leading commas, JOIN and CTE layout, aliasing, and snake_case naming for readable queries.
What each naming style is, which languages and contexts use it, and how to convert between them.
Are UUIDs and GUIDs the same thing? Mostly yes — but the differences occasionally matter.
Copy-paste cron expressions for every 5 minutes, daily, weekly, monthly, business hours, and more.
Honest tradeoffs between JWT and session auth, with concrete security guidance.
Why SHA-256 is wrong for passwords and bcrypt is right — with migration patterns and code.
When to use YAML for configuration and JSON for data interchange.
Flags, RegExp methods, lookbehind, named groups, and Unicode property escapes.
The re module, raw strings, named groups, verbose mode, and gotchas.
The regexp package, RE2 limits (no backreferences/lookahead), MustCompile, named groups.
Pattern and Matcher, flags, named groups, the double-backslash trap, replaceAll.
preg_match, delimiters, modifiers, named groups, the u (UTF-8) modifier, return-value traps.
The regex crate, no backreferences or lookaround, compiling once, named groups.
The Regex class, GeneratedRegex, variable-length lookbehind, ReDoS timeouts.
Literals, match? vs =~, named captures, the ^/$ line-anchor trap, /m dotall.
Zero-width assertions explained with examples and engine support tables.
Pull every email address out of any text — patterns, JS, Python, Bash, edge cases.
Pull every URL out of any text — patterns, JS, Python, Bash, trailing punctuation.
US and international patterns — JS, Python, Bash, extensions, when to use libphonenumber.
Apache, Nginx, syslog, app logs — named groups in JS, Python, Bash, plus stack traces.
Capture groups, backreferences, $1 vs \1 — JS, Python, sed, vim with examples.
Reserved characters, currency, arrows, math, Greek — named, numeric, hex.