Base64 Encoder & Decoder

Encode plain text and JSON to Base64, or decode Base64 strings with full UTF-8 and URL-safe support.

Private by architecture: All processing is 100% client-side memory. Your data never leaves this browser tab.
Plain Text / JSON
0 lines · 0 charsText
Base64 Output
Ctrl/Cmd+Shift+C
0 charsBase64

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).

Frequently Asked Questions

Does this handle emojis and other non-ASCII characters?
Yes. Text is encoded as UTF-8 bytes before Base64 conversion, so emojis, accented characters, and other Unicode round-trip correctly.
What is URL-safe Base64?
It replaces + with - and / with _, and removes trailing = padding, so the result can be used directly in URLs, filenames, or query parameters without escaping.
Can I decode a URL-safe string without checking the option?
Yes. Decoding always accepts both standard and URL-safe alphabets and re-adds any missing padding automatically, regardless of the URL-safe checkbox.
Does the swap button convert my current output back?
Yes. The swap button flips between Encode and Decode mode and moves the current output into the input field so you can immediately reverse the conversion.
Is any data sent to a server?
No. Encoding and decoding run entirely in your browser using native btoa/atob APIs. Nothing leaves your browser.