Base64 Encoder & Decoder
Encode plain text and JSON to Base64, or decode Base64 strings with full UTF-8 and URL-safe support.
About This Tool
Encodes plain text or JSON to Base64, or decodes a Base64 string back to text, running through the browser native btoa/atob with UTF-8 handling on top so emoji and accented characters survive the round trip. Conversion runs live as you type, and the swap button flips Encode/Decode while carrying the current output back into the input.
It is for text and JSON strings: if you are decoding a Base64 payload that is actually image data and want to preview or download it as a picture, use Base64 to Image Previewer instead.
Key Features
- Encode / Decode mode select: Swap direction instantly, with a dedicated swap button that moves output into input.
- Full UTF-8 support: Text passes through TextEncoder/TextDecoder, so emoji and non-ASCII round-trip correctly.
- URL-safe toggle: Swaps +// for -/_ and strips padding for use in URLs or filenames.
- Lenient decode: Accepts both standard and URL-safe alphabets and re-pads automatically.
- Live conversion: Output updates on every keystroke: no separate submit step required.
- Download output: Saves the result as .txt (encode) or .json (decode).