Tidy Dev Tools

Encoding tools: Base64 encode and decode

Base64 and other encodings, UTF-8 safe.

Encoding turns bytes into text that survives places where only plain characters are allowed: email bodies, URLs, HTTP headers, JSON strings and data URLs. Base64 is the most common scheme. It is not encryption — anyone can decode it — and it makes data about a third larger.

All encoders here treat text as UTF-8, so emoji, accented letters and non-Latin scripts round-trip correctly. The decoder accepts both the standard and the URL-safe alphabet, missing padding and line breaks, and tells you the position of any invalid character.

Use the encoder for Basic auth headers, embedding small files in JSON or building data URLs, and the decoder for inspecting tokens, email attachments and configuration values you received in encoded form.

Base64 is one member of a larger family. Hexadecimal doubles the size but is easy to read byte by byte; percent-encoding protects reserved characters in URLs; HTML entities keep markup intact. Each solves a different problem, and mixing them up is a frequent source of double-encoded strings such as %253D appearing in server logs.

Upcoming tools will cover JWT decoding, URL encoding and hex dumps. Until then, remember the quick checks: Base64 output never contains spaces, its length is a multiple of four once padded, and anything ending in two equals signs carried a final block of exactly one byte.

Tools

  • Base64 Encode

    Turns any Unicode text into Base64, with an optional URL-safe alphabet for tokens and file names.

  • Base64 Decode

    Decodes standard or URL-safe Base64 back to UTF-8 text and shows the position of any invalid character.