---
id: object/codeunit/4110
type: object
title: Codeunit 4110 "Base64 Convert"
summary: Codeunit 4110 "Base64 Convert" in System Application (System.Text). 19 public procedures. Present since at least BC23, still in BC30, changed in BC25-26, BC28.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: null
  last_changed: "28"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 5cdfa8ad7e704e58515ba08f50e1731b18a2ca49d42603ca02066c3be2888a3c
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Base64%20Convert/src/Base64Convert.Codeunit.al
    title: src/System Application/App/Base64 Convert/src/Base64Convert.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 4110
name: Base64 Convert
namespace: System.Text
app: System Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "25"
  - "26"
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 19
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 0
  called_by: 30
  implements: 0
---

# Codeunit 4110 "Base64 Convert"

> Codeunit 4110 "Base64 Convert" in System Application (System.Text). 19 public procedures. Present since at least BC23, still in BC30, changed in BC25-26, BC28.

System Application · System.Text · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Base64%20Convert/src/Base64Convert.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Public |
| SingleInstance | true |

## Procedures

- `ToBase64(String: Text): Text`: Converts the value of the input string to its equivalent string representation that is encoded with base-64 digits.
- `ToBase64(SecretString: SecretText): SecretText`: Converts the value of the input secret string to its equivalent secret string representation that is encoded with base-64 digits.
- `ToBase64(String: Text; TextEncoding: TextEncoding): Text`: Converts the value of the input string to its equivalent string representation that is encoded with base-64 digits.
- `ToBase64(String: Text; TextEncoding: TextEncoding; Codepage: Integer): Text`: Converts the value of the input string to its equivalent string representation that is encoded with base-64 digits.
- `ToBase64(String: Text; InsertLineBreaks: Boolean): Text`: Converts the value of the input string to its equivalent string representation that is encoded with base-64 digits.
- `ToBase64(String: Text; InsertLineBreaks: Boolean; TextEncoding: TextEncoding; Codepage: Integer): Text`: Converts the value of the input string to its equivalent string representation that is encoded with base-64 digits.
- `ToBase64(InStream: InStream): Text`: Converts the value of the input stream to its equivalent string representation that is encoded with base-64 digits.
- `ToBase64(InStream: InStream; InsertLineBreaks: Boolean): Text`: Converts the value of the input stream to its equivalent string representation that is encoded with base-64 digits.
- `ToBase64(InStream: InStream; InsertLineBreaks: Boolean; OutStream: OutStream)`: Converts the value of the input stream to its equivalent string representation that is encoded with base-64 digits.
- `ToBase64Url(String: Text): Text`: Converts the value of the input string to its equivalent string representation that is encoded with base64 URL-safe characters.
- `ToBase64Url(SecretString: SecretText): SecretText`: Converts the value of the input secret string to its equivalent secret string representation that is encoded with base64 URL-safe characters.
- `ToBase64Url(String: Text; TextEncoding: TextEncoding): Text`: Converts the value of the input string to its equivalent string representation that is encoded with base64 URL-safe characters.
- `ToBase64Url(String: Text; TextEncoding: TextEncoding; Codepage: Integer): Text`: Converts the value of the input string to its equivalent string representation that is encoded with base64 URL-safe characters.
- `ToBase64Url(InStream: InStream): Text`: Converts the value of the input stream to its equivalent string representation that is encoded with base64 URL-safe characters.
- `FromBase64(Base64String: Text): Text`: Converts the specified string, which encodes binary data as base-64 digits, to an equivalent regular string.
- `FromBase64(Base64SecretString: SecretText): SecretText`: Converts the specified secret string, which encodes binary data as base-64 digits, to an equivalent regular secret string.
- `FromBase64(Base64String: Text; TextEncoding: TextEncoding): Text`: Converts the specified string, which encodes binary data as base-64 digits, to an equivalent regular string.
- `FromBase64(Base64String: Text; TextEncoding: TextEncoding; Codepage: Integer): Text`: Converts the specified string, which encodes binary data as base-64 digits, to an equivalent regular string.
- `FromBase64(Base64String: Text; OutStream: OutStream)`: Converts the specified string, which encodes binary data as base-64 digits, to an equivalent regular string.

## Called by

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 1259 "Certificate Management"](../codeunit/1259.md) (4 calls: `ReadCertFromBlob → ToBase64`, `ReadCertFromStream → ToBase64`, `SaveCertToIsolatedStorage → ToBase64`, …)
- [Codeunit 8889 "Email Account Impl."](../codeunit/8889.md) (3 calls: `FindAllConnectors → FromBase64`, `ImportLogo → FromBase64`, `ImportLogoBlob → FromBase64`)
- [Codeunit 1605 "PEPPOL Management"](../codeunit/1605.md) (2 calls: `GeneratePDFAttachmentAsAdditionalDocRef → ToBase64`, `GetAdditionalDocRefInfo → ToBase64`)
- [Codeunit 3970 "Image Impl."](../codeunit/3970.md) (2 calls: `FromBase64 → FromBase64`, `ToBase64 → ToBase64`)
- [Codeunit 7241 "MDM Cross-Env Source API"](../codeunit/7241.md) (2 calls: `BuildBlobValue → ToBase64`, `BuildMediaValue → ToBase64`)
- [Codeunit 8614 "Config. XML Exchange"](../codeunit/8614.md) (2 calls: `ConvertBlobToBase64String → ToBase64`, `GetConfigPackageDataValue → FromBase64`)
- [Codeunit 8905 "Email Message Impl."](../codeunit/8905.md) (2 calls: `AddAttachment → FromBase64`, `Attachments_GetContentBase64 → ToBase64`)
- [Table 4356 "Agent Message Template"](../table/4356.md) (2 calls: `ConvertAttachmentToJson → ToBase64`, `GetAttachmentFromJson → FromBase64`)
- [Codeunit 1140 "OAuth 2.0 Mgt."](../codeunit/1140.md) (1 call: `GenerateRandomCodeVerifier → ToBase64`)
- [Codeunit 1464 "CertificateRequest Impl."](../codeunit/1464.md) (1 call: `CreateSigningRequest → ToBase64`)
- [Codeunit 1630 "Office Management"](../codeunit/1630.md) (1 call: `GetContent → ToBase64`)
- [Codeunit 2003 "ML Prediction Management"](../codeunit/2003.md) (1 call: `DownloadPlot → FromBase64`)
- [Codeunit 20118 "AMC Bank Service Request Mgt."](../codeunit/20118.md) (1 call: `AddAMCSpecificHttpHeaders → ToBase64`)
- [Codeunit 20124 "AMC Bank REST Request Mgt."](../codeunit/20124.md) (1 call: `AddAMCSpecificHttpHeaders → ToBase64`)
- [Codeunit 2717 "Page Summary Provider Impl."](../codeunit/2717.md) (1 call: `ExtractPictureFromMedia → ToBase64`)
- [Codeunit 3317 "Payables Agent OCV"](../codeunit/3317.md) (1 call: `TriggerPayablesAgentTaskThumbsFeedback → ToBase64`)
- [Codeunit 4113 "Swiss QR Code Helper"](../codeunit/4113.md) (1 call: `LoadSwissCrossImage → FromBase64`)
- [Codeunit 44 "ReportManagement"](../codeunit/44.md) (1 call: `GetLogoBase64 → ToBase64`)
- [Codeunit 4421 "SOA Attachment MLLM"](../codeunit/4421.md) (1 call: `TryExtractAttachmentContent → ToBase64`)
- [Codeunit 4509 "Email - Outlook API Helper"](../codeunit/4509.md) (1 call: `AddAttachmentsToMessage → FromBase64`)
- [Codeunit 4516 "OAuth2 SMTP Authentication"](../codeunit/4516.md) (1 call: `GetUserName → FromBase64`)
- [Codeunit 502 "OAuth2Impl"](../codeunit/502.md) (1 call: `GetClaims → FromBase64`)
- [Codeunit 5142 "Contoso Utilities"](../codeunit/5142.md) (1 call: `GetFileStream → FromBase64`)
- [Codeunit 5459 "JSON Management"](../codeunit/5459.md) (1 call: `TryReadAsBase64 → FromBase64`)
- [Codeunit 5461 "Json Impl."](../codeunit/5461.md) (1 call: `TryReadAsBase64 → FromBase64`)
- [Codeunit 6999 "Outlook Add-In Services"](../codeunit/6999.md) (1 call: `GetEmailAndAttachments → FromBase64`)
- [Codeunit 7232 "MDM Inline Media"](../codeunit/7232.md) (1 call: `TryDecodeContent → FromBase64`)
- [Codeunit 7248 "MDM Source Response"](../codeunit/7248.md) (1 call: `TryFromBase64 → FromBase64`)
- [Codeunit 8351 "MCP Config Implementation"](../codeunit/8351.md) (1 call: `EncodeForMCPHeaderIfNonAscii → ToBase64`)
- [Codeunit 9451 "File Account Impl."](../codeunit/9451.md) (1 call: `ImportLogo → FromBase64`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC25-26, BC28

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Base64 Convert")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
