Web encoding is not one operation. Base64 represents bytes with a text alphabet, percent encoding protects data inside a URL, a query string organizes an ordered parameter list, and a JWT combines JSON, Base64URL, and a signature whose validity is not established by reading the payload. This path organizes those layers so you can choose the right tool and diagnosis instead of applying transformations blindly.
Start with the context
- For text, establish its character encoding—usually UTF-8—then choose standard Base64 or Base64URL according to the protocol.
- When building an address, distinguish a complete URL, path segment, query value, and form field. Each context preserves different delimiters.
- When inspecting a token, treat its header and payload as untrusted until a library verifies the signature, algorithm, and claims.
Recommended diagnostic order
Preserve the exact input and state the expected contract. Validate the outer layer before decoding it: alphabet and padding for Base64, escapes and UTF-8 for a URL, or segment count for a JWT. Only then interpret the recovered content.
This order separates truncated input from a Unicode problem, double encoding from a literal percent sign, and a readable JWT date from a genuinely valid token. The linked tools process data locally in the browser; even so, avoid pasting active credentials on a device you do not control.