Encoding is not encryption
Encoding changes how data is represented so that it can travel safely through a particular channel. Base64 represents binary data using 64 printable characters, which is how images are embedded in data URLs, how email attachments are sent, and how credentials are packed into HTTP Basic authentication headers. Encoded output is about one third larger than the original. Base64url is a variant that replaces + and / with - and _ so the result is safe in URLs and file names.
URL encoding, also called percent-encoding, replaces characters that have special meaning in URLs, such as spaces, &, ?, and #, with a percent sign followed by two hexadecimal digits. HTML entities such as < and & serve a similar purpose inside HTML. None of these transformations hides anything: anyone can decode them instantly, so never treat encoded data as protected.
Inspecting JSON Web Tokens
A JSON Web Token (JWT) is a compact token made of three Base64url-encoded parts separated by dots: a header that names the signing algorithm, a payload containing claims, and a signature. Standard claims include iss (issuer), sub (subject), aud (audience), exp (expiry time), iat (issued at), and nbf (not before). The time-based claims are Unix timestamps in seconds.
Decoding a token lets you check why an API rejects it, for example an expired exp value, the wrong audience, or a missing scope. Decoding is not verification: the payload is readable by anyone, and only checking the signature with the correct key proves the token is genuine. Do not put secrets in a JWT payload, and treat real production tokens as credentials that should not be pasted into shared documents or chat.
Hashes and checksums
A hash function turns input of any size into a fixed-length fingerprint. The same input always produces the same hash, and a tiny change in input produces a completely different result. This makes hashes ideal for verifying that a downloaded file matches the published checksum, detecting changed content, and building cache keys.
MD5 and SHA-1 are fast but broken for security purposes, because attackers can create collisions. Use the SHA-2 family, such as SHA-256 or SHA-512, for integrity checks. Passwords are a special case: they should be stored with deliberately slow, salted algorithms such as bcrypt, scrypt, or Argon2, never with a plain fast hash. When you need to prove that a message came from someone holding a shared secret, use an HMAC rather than a bare hash.
Timestamps, regular expressions, and naming conventions
Unix time counts seconds since 1 January 1970 UTC. JavaScript and many APIs use milliseconds instead, so a 13-digit value is usually milliseconds and a 10-digit value is seconds. ISO 8601 strings such as 2026-10-16T09:30:00Z are easier for people to read, and the trailing Z or an offset such as +05:30 states the time zone explicitly. Storing times in UTC and converting only for display avoids most time zone bugs.
Regular expressions describe text patterns for searching, validating, and extracting data. Test them against both matching and non-matching examples, watch out for greedy quantifiers that match more than intended, and remember that syntax differs slightly between languages. Nested quantifiers on untrusted input can cause catastrophic backtracking, so keep patterns simple.
Different ecosystems prefer different naming styles: camelCase in JavaScript, snake_case in Python and SQL, kebab-case in URLs and CSS, PascalCase for classes, and CONSTANT_CASE for environment variables. Converting names consistently avoids subtle mismatches between an API and the code that consumes it.