Base64 Encoder / Decoder
Encode text and files to Base64, or decode Base64 back to text. URL-safe mode supported. All processing is local.
Plain text
Base64
How Base64 Encoder / Decoder Works
Choose mode & paste
Select Encode or Decode. Paste your text into the left panel, or use the file button to encode any file directly to Base64.
Result appears instantly
The output updates as you type. Switch modes with the toggle — the Swap button flips output back to input so you can chain operations.
Copy or download
Copy the encoded or decoded result to clipboard with one click. In decode mode you can also download the result as a .txt file.
Key Features
Encode & Decode
Switch between encode and decode with one click. The output updates as you type — no need to click a button.
File encoding
Encode any file (image, PDF, binary) to a Base64 data URL — useful for embedding files in HTML, CSS, or JSON.
URL-safe mode
Toggle URL-safe Base64 which replaces + with - and / with _ and strips = padding — safe for use in URLs and filenames without escaping.
Swap output to input
The Swap button puts the current output back into the input and flips the mode — useful for quickly round-tripping an encode/decode.
100% browser-based
Uses the browser's built-in btoa() and atob() functions. Nothing is ever transmitted over the network.
Live preview
The encoded or decoded output updates instantly as you type. Encoding is near-instantaneous even for large inputs.