Base64 Converter

Encode or decode strings and files into Base64. Base64 safely carries binary data as text and is frequently used in data URIs, email, JSON, and configuration files.
This tool supports UTF-8, optional URL-safe substitutions (+-, /_), toggling padding (=), and inserting line breaks every 76 characters. All processing happens entirely in your browser (no data is sent).

Text / File ⇄ Base64

How to use

  1. Text conversion: Enter text in the input field and press Encode → to display its Base64 form in the output area. Paste Base64 into the output field and press ← Decode to restore the original text.
  2. File conversion: Use Choose file (→ Base64) to convert a file into Base64 and place it in the output field. To revert Base64 to a file, paste it into the output and press Base64 → File.
  3. Options: Toggle URL-safe, padding, or 76-character wrapping as required. Many web APIs expect URL-safe Base64 without padding.
  4. Shortcuts: Swap exchanges input and output, Copy copies the output text, and Clear wipes both fields.

Notes

  • URL-safe mode replaces + with - and / with _, and you can remove padding (=) when necessary.
  • The 76-character wrap option follows MIME-style line breaks. Some APIs require Base64 without line breaks.
  • Decoding ignores whitespace and line breaks. Invalid input triggers an error.