Blog
Wild & Free Tools

Base64 Encode and Decode in Excel, Google Sheets, and Notepad++

Last updated: February 17, 2026 6 min read

Table of Contents

  1. Base64 in Excel — Using VBA and Formulas
  2. Base64 in Google Sheets
  3. Base64 in Notepad++ with the MIME Tools Plugin
  4. When the Browser Tool Is Faster
  5. Decoding Base64 Values in Excel Columns
  6. Frequently Asked Questions

Developers and analysts who work heavily in Excel, Google Sheets, or Notepad++ sometimes need to Base64 encode or decode values without switching to a separate tool. While these applications are not primarily designed for encoding operations, there are ways to do it in each — formulas, scripts, and plugins.

This guide covers each option and explains when the simplest approach (a free browser tool) saves more time than building a formula or installing a plugin.

Base64 in Excel — VBA Macro Approach

Excel does not have built-in Base64 functions, but you can add them using VBA (Visual Basic for Applications). Here is a complete VBA function you can add to any workbook:

Function Base64Encode(sText As String) As String
    Dim oXML As Object
    Dim oNode As Object
    Set oXML = CreateObject("MSXML2.DOMDocument")
    Set oNode = oXML.createElement("b64")
    oNode.DataType = "bin.base64"
    oNode.nodeTypedValue = _
        CreateObject("ADODB.Stream").Write(sText)
    Base64Encode = Replace(oNode.Text, vbLf, "")
    Set oNode = Nothing
    Set oXML = Nothing
End Function

A simpler approach that works in most Excel versions without MSXML dependencies:

Function B64Encode(s As String) As String
    Dim b() As Byte
    b = StrConv(s, vbFromUnicode)
    With CreateObject("MSXML2.DOMDocument.6.0") _
        .createElement("b")
        .DataType = "bin.base64"
        .nodeTypedValue = b
        B64Encode = .Text
    End With
End Function

Function B64Decode(s As String) As String
    With CreateObject("MSXML2.DOMDocument.6.0") _
        .createElement("b")
        .DataType = "bin.base64"
        .Text = s
        B64Decode = StrConv(.nodeTypedValue, vbUnicode)
    End With
End Function

To add this to Excel: press Alt+F11 to open the VBA editor, insert a new Module, paste the code, and save. You can then use =B64Encode(A1) and =B64Decode(A1) as regular worksheet functions.

Base64 in Google Sheets — Apps Script

Google Sheets uses JavaScript for its Apps Script environment, which has built-in Base64 utilities via the Utilities service:

// In Apps Script (Extensions > Apps Script)
function base64Encode(text) {
  return Utilities.base64Encode(text);
}

function base64Decode(encoded) {
  return Utilities.newBlob(
    Utilities.base64Decode(encoded)
  ).getDataAsString();
}

To use these as spreadsheet functions:

  1. Go to Extensions > Apps Script in your Google Sheet
  2. Paste the functions above
  3. Save and return to the spreadsheet
  4. Use =base64Encode(A1) directly in cells

Google Sheets also has BASE64 and DEBASE64 as built-in functions in some Google Workspace editions. Check if =BASE64(A1) works in your Sheet — if it does, no script setup is needed.

Sell Custom Apparel — We Handle Printing & Free Shipping

Base64 in Notepad++ — MIME Tools Plugin

Notepad++ supports Base64 encoding and decoding through the MIME Tools plugin, which comes pre-installed in most recent Notepad++ distributions:

Check if MIME Tools is installed: Go to Plugins menu and look for "MIME Tools." If it is there, you have it.

To install if missing: Plugins > Plugins Admin > search for "MIME Tools" > Install.

Encoding in Notepad++:

  1. Select the text you want to encode
  2. Plugins > MIME Tools > Base64 Encode
  3. The selected text is replaced with its Base64 encoding

Decoding in Notepad++:

  1. Select the Base64 string
  2. Plugins > MIME Tools > Base64 Decode
  3. The selected text is replaced with the decoded content

The MIME Tools plugin also supports URL encoding, quoted-printable, and other encoding formats from the same menu.

When the Browser Tool Saves More Time

Setting up VBA in Excel, Apps Script in Google Sheets, or finding and installing a Notepad++ plugin all take time. For one-off encoding or decoding tasks, the free browser tool is often the fastest option:

Use the Excel/Sheets formula approach when you need Base64 as part of a larger spreadsheet workflow — processing a column of values, or building automation that encodes values dynamically. Use the browser tool when you just need to encode or decode a specific string quickly.

Decoding a Column of Base64 Values in Excel

A common analyst workflow: you receive data where one column contains Base64-encoded values (API responses, encoded identifiers, encoded configuration values) and you need to decode all of them to inspect the data.

With the VBA function from Step 1 installed:

  1. Assume Base64 values are in column A, starting in A2
  2. In cell B2, enter =B64Decode(A2)
  3. Copy B2 down for all rows
  4. Column B now shows the decoded values for every row

For a smaller dataset (under 20 values), copying them into the free browser tool one by one is faster than setting up the VBA. For a large column of hundreds of encoded values, the Excel formula approach pays off.

Note: VBA-based Base64 decoding may have issues with non-ASCII characters depending on the encoding used and the Excel locale settings. If decoded text shows garbled characters, the source data may use a different character encoding than your system expects — try testing with a known simple ASCII string first to confirm the functions work in your environment.

Try It Free — No Signup Required

Runs 100% in your browser. No data is collected, stored, or sent anywhere.

Open Free Base64 Encoder/Decoder

Frequently Asked Questions

Does Excel have a built-in BASE64 function?

Not in standard Excel as of 2026. The B64Encode and B64Decode functions require VBA code added to your workbook. Google Sheets has a built-in BASE64() function in some Workspace editions. Check if it works in your Sheet before writing a script.

Why does Notepad++ show garbled characters after decoding?

The decoded content may be binary data (not text), or the text may use a different character encoding than Notepad++ expects. MIME Tools decodes to the byte sequence — if the result was originally UTF-8 text, change the encoding in Notepad++ (Encoding menu > Encode in UTF-8) and the display should correct.

Can I Base64 encode an entire Excel file?

Yes, technically — you can read the binary file bytes and encode them. But this is not something you do inside Excel itself. You would use a programming language (Python, PowerShell) or a file-to-Base64 tool to convert the whole file. Our browser encoder handles text strings, not file uploads.

Andrew Walsh
Andrew Walsh Developer Tools & API Writer

Andrew worked as a developer advocate at two SaaS startups writing API documentation used by thousands of engineers. He brings technical precision to his coverage of developer tools and data format converters.

More articles by Andrew →
Launch Your Own Clothing Brand — No Inventory, No Risk