Base64 Encoder & Decoder
How to Use
📖 Tool Introduction
The Base64 Encoder and Decoder is a completely free, offline conversion tool that helps you move any piece of text back and forth between a human-readable string and its Base64 representation. It treats the input strictly as a UTF-8 byte stream, so Chinese characters, Japanese kana, emoji and exotic symbols are encoded and restored without a single garbled character. Beyond standard Base64, it offers the URL-safe variant known as Base64url, which swaps plus and slash for hyphen and underscore and can strip the trailing padding, making the result safe to embed inside URLs, JWT tokens and Data URIs. You can also control the line width of the output: no wrapping suits programmatic use, while wrapping every 64 or 76 characters matches the long-standing MIME email and PEM certificate conventions. When decoding, the tool validates the input and clearly reports damaged or truncated strings instead of silently producing mojibake. Every calculation runs locally in your browser, so your text is never uploaded to any server and sensitive content stays private. A pill switch at the top selects the encode or decode direction, and live meters show the raw byte count and the length ratio, so you always know how much the encoding expanded your data. It works smoothly on both desktop and mobile, needs no registration and no install, and treats the whole task as a pure in-browser utility that never phones home. Whether you are preparing an email attachment, inspecting a token, or embedding an image inline in HTML, the round trip takes one click. Developers embedding small assets or web fonts often flip between the standard and URL-safe variants several times a day, and the visible byte meter makes it obvious how much the encoding grows the payload before you ship it. Because it is a pure client-side utility, it sits quietly on any bookmark bar and waits for a paste, never asking you to sign in, watch an advertisement or download a package. Students learning how data travels on the web also find the side-by-side byte statistics helpful when they compare an original sentence with its encoded form, which turns an abstract standard into something they can actually see.
✨ Key Features
- UTF-8 safe: works on the byte stream, so CJK and emoji restore perfectly
- Bidirectional: flip between encode and decode with the top pill switch
- URL-safe: the Base64url variant swaps +/ and can drop padding
- Line wrapping: choose none, 64 or 76 characters per output line
- Validation: malformed input is rejected with a clear error message
- Fully local: runs offline, text never leaves your browser
📝 How to Use
- Pick the encode or decode direction with the top pill control
- Tick the URL-safe option if the result will live inside a URL
- Choose the desired output line width from the dropdown
- Paste your text or Base64 string into the input area
- Click Encode or Decode, then inspect and copy the output
⚠️ Notes
- Byte boundaries: Base64 works on bytes, so one Chinese character usually costs three bytes
- Padding: do not drop the trailing = in standard Base64; URL-safe mode strips it for you
- Valid alphabet: decoding accepts only A-Z, a-z, 0-9, +, / and =, anything else errors out
- Large input: compress very large payloads first to keep the page responsive
- Not encryption: Base64 is encoding, anyone can reverse it, so never hide secrets with it