Skip to content

Base64 Encoder

Many APIs and Power Platform actions expect data as Base64 text: a Basic authentication header, a file sent inside a JSON body or an image embedded as a data URI. This Base64 encoder converts any text to Base64 in your browser. It encodes as UTF-8, so accented letters, non-English characters and emoji come out correctly, and the result is ready to copy into your flow, app or API request.

Also known as: base64 encode, encode to base64, text to base64, base64 encode online.

Your data is processed locally in your browser and is not uploaded to our servers.

Features

  • Correct UTF-8 handling
  • Copy the result in one click
  • Runs locally in your browser

How to use the Base64 Encoder

  1. Type or paste the text you want to encode, for example username:password for a test account.
  2. Click Encode to Base64.
  3. Copy the result with the Copy button.
  4. Paste it into the header, body or property that needs it, for example after the word Basic in an Authorization header.
  5. To check your work, paste the result into the Base64 Decoder and confirm that you get the original text back.

Real-world use case: Basic authentication and API payloads in Power Automate

A common job is calling an API that uses Basic authentication from an HTTP action. The Authorization header must contain the word Basic, a space, and the Base64 form of username:password. Encode a test pair here to see what the correct value looks like, then build the same value in the flow with base64(concat(variables('user'), ':', variables('password'))). Comparing the two outputs quickly shows a missing colon or an extra space. The HTTP action also has a built-in Basic authentication setting, which is better when it is available.

Never type real passwords into a flow. Keep secrets in Azure Key Vault or in a secret environment variable, and turn on Secure Inputs and Secure Outputs so the value does not appear in the run history.

The second case is an API that wants file content as Base64 inside a JSON body. The GitHub contents API, for example, expects the content field to be Base64 text. Encode a small test string here, send it from an HTTP action and check the result before you automate real files with the base64() function.

In Power Apps, Base64 mostly appears inside images. The JSON() function with the IncludeBinaryData option returns images as Base64 data, and an Image control can show a value that starts with data:image/png;base64, followed by the encoded text. Remember that Base64 makes data about one third larger, so large files should travel through a flow or a connector rather than a text variable.

Example input and output

Input and output

user:pass  ->  dXNlcjpwYXNz

The header you send

Authorization: Basic dXNlcjpwYXNz

Accents and emoji (UTF-8)

Café ☕  ->  Q2Fmw6kg4piV

The same job inside a flow

base64(concat(variables('user'), ':', variables('password')))

Frequently asked questions

How do I encode Base64 in Power Automate?

Use the base64() function, for example base64('Hello'), which returns SGVsbG8=. To preview the result before you build the expression, paste the same text into a Base64 encoder.

Does Base64 encoding work with emoji and accents?

Yes, as long as the text is encoded as UTF-8 first, which this tool does. Tools that skip this step can fail or give different results for non-English characters.

Why is the Base64 result longer than the original?

Base64 writes every 3 bytes of data as 4 characters, so the result is about one third larger.

Why use PowerApps Ninja?

Credentials and payloads should not pass through a server you do not control. PowerApps Ninja encodes locally in your browser and keeps nothing. Use test values only in any online tool, but with this one there is no upload to worry about, and the page shows the matching Power Automate expressions.

Related tools