Category · 1 tool · 1 guide
Encoding and decoding tools
Computers store bytes, but many of the channels developers use only carry text: JSON fields, HTTP headers, URLs, email bodies, environment variables. Encodings bridge that gap. Base64 turns any bytes into safe ASCII characters, percent-encoding makes text safe inside a URL, and HTML entities keep characters like < from being read as markup.
Bugs here are subtle because the output usually looks plausible. An emoji encoded as Latin-1 instead of UTF-8, a "+" that becomes a space in a query string, or Base64 that is valid but uses the wrong alphabet for a JWT can each break an integration while every individual step appears to work.
These tools encode and decode with explicit settings, so you can see exactly which bytes go in and which characters come out. Files and text are processed locally in your browser and never uploaded.
Tools in this category
Common tasks
- Put binary data in a JSON fieldEncode an image, PDF or key file as Base64 so it can travel in a JSON body or an environment variable.
- Build a data URI for a small assetInline a tiny icon or font directly in CSS or HTML to save a network request.
- Create a Basic auth header valueBase64-encode "username:password" for an Authorization: Basic header, and remember it is not encryption.
- Read the parts of a JWTJWT segments are Base64URL-encoded JSON; decode them to see the header and claims.
- Check how a URL encodes special charactersSee how spaces, ampersands and non-ASCII text are percent-encoded in query parameters.
Key concepts
- Base64
- Encodes every 3 bytes as 4 characters from a 64-character alphabet (A-Z, a-z, 0-9, + and /), padding the end with =. Output is about 33% larger than the input.
- Base64URL
- A variant that replaces + and / with - and _ and usually drops the = padding, so the result is safe in URLs, filenames and JWTs without further escaping.
- UTF-8
- The dominant text encoding on the web. It stores ASCII in one byte and other characters in two to four bytes. Encoding the same text as UTF-16 or Latin-1 gives different bytes and therefore different Base64.
- Percent-encoding
- URL encoding replaces unsafe characters with % followed by two hex digits of each UTF-8 byte, so a space becomes %20 and é becomes %C3%A9.
- Encoding vs encryption
- Encoding is a reversible format change that anyone can undo. Encryption needs a key to reverse. Base64-encoded secrets are effectively plain text.
Best practices
- Always state the text encoding; convert strings to UTF-8 bytes before Base64-encoding unless a protocol says otherwise.
- Use URL-safe Base64 for anything that goes into a URL, cookie or filename, and make sure both sides agree on padding.
- Avoid Base64 for large files in JSON APIs; the size overhead and memory use add up. Upload binary data with multipart or a signed URL instead.
- Never treat Base64 as a security measure. Encrypt or hash sensitive data, then encode the result if it must be text.
- Decode and re-check data at the receiving end in tests so mismatched alphabets or padding are caught early.