---
title: "Base64 Encode - Convert text to Base64 format | Web ToolBox"
description: "Encode text as Base64 strings. It supports both standard and URL-safe formats, making it useful for API integration, data transfer, and encoding checks."
canonical_url: "https://web-toolbox.dev/en/tools/base64-encode"
meta:
  author: K
  "og:description": "Encode text as Base64 strings. It supports both standard and URL-safe formats, making it useful for API integration, data transfer, and encoding checks."
  "og:image": "https://web-toolbox.dev/og/en/tools/base64-encode-bde01039.png"
  "og:image:alt": "Base64 Encode"
  "og:image:height": "630"
  "og:image:width": "1200"
  "og:title": "Base64 Encode - Convert text to Base64 format | Web ToolBox"
---

> Index of every page on this site: [llms.txt](https://web-toolbox.dev/llms.txt)

# **Base64 Encode**

Convert text to standard or URL-safe Base64

**Input text**

**Base64 encode result**

Read-only

## What is Base64 Encode?

A tool for converting text into a Base64 string. It is useful when you want to check a value before sending it to an API, encode text for use in a URL, or process multi-line input line by line.

The result updates in real time as you change the input or settings.

## How to Use

1. Enter the text you want to encode in the input area on the left.
2. Turn on options such as line-by-line encoding or URL-safe conversion if needed.
3. Check the Base64 result in the output area on the right.

### Encoding Options

#### Encode Line by Line

This setting controls whether multi-line text should be encoded as one block or line by line.

- **Enabled** - Encode each line individually (convenient for batch processing)
- **Disabled** - Encode entire text including newlines as a single unit

Enable it when you want to process multiple values one line at a time. Disable it when you want to encode the entire text exactly as written, including line breaks.

#### Convert to URL-safe Format

Standard Base64 contains characters like `**+**` and `**/**` that can cause issues in URLs.

- **Enabled** - Replace `**+**` with `**-**` and `**/**` with `**_**` for URL-safe format
- **Disabled** - Use standard Base64 format

URL-safe output is useful for query parameters and URL fragments. If you need regular Base64 for another system, leave this option off.

## Input and Output Example

```text
hello@example.com
```

When you enter a string like this, the result becomes:

```text
aGVsbG9AZXhhbXBsZS5jb20=
```

## Use Cases

- Checking a string in Base64 before sending it to an API
- Encoding values in a URL-safe format for use in URLs
- Converting multi-line input one line at a time
- Inspecting values related to auth headers or token-like strings

## How Base64 Works

Base64 encoding represents data using 64 characters (A-Z, a-z, 0-9, `**+**`, `**/**`) plus `**=**` when padding is needed.

```text
Original data: Man
Binary: 01001101 01100001 01101110
6-bit groups: 010011 010110 000101 101110
Base64 conversion: T W F u
```

## Things to Keep in Mind

- Base64 is encoding, not encryption
- When line-by-line encoding is enabled, each line becomes a separate Base64 result
- URL-safe output is convenient, but some systems expect standard Base64 instead

For details, refer to [**RFC 4648**](https://datatracker.ietf.org/doc/html/rfc4648).

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://web-toolbox.dev/en#website","@type":"WebSite","description":"アカウント登録不要で使える無料Web開発ツール80種類以上。JSON整形、Base64変換、カラーコード変換、QRコード生成などをブラウザ上で瞬時に実行。開発者の作業効率を大幅に向上させます。","inLanguage":"en-US","name":"Web ToolBox","url":"https://web-toolbox.dev/en","translationOfWork":{"@id":"https://web-toolbox.dev/#website"}},{"@id":"https://web-toolbox.dev/en/tools/base64-encode#webpage","@type":"WebPage","description":"Encode text as Base64 strings. It supports both standard and URL-safe formats, making it useful for API integration, data transfer, and encoding checks.","name":"Base64 Encode - Convert text to Base64 format","url":"https://web-toolbox.dev/en/tools/base64-encode","isPartOf":{"@id":"https://web-toolbox.dev/en#website"},"potentialAction":[{"@type":"ReadAction","target":["https://web-toolbox.dev/en/tools/base64-encode"]}]},{"@id":"https://web-toolbox.dev/en/tools/base64-encode#/schema/web-application/1","@type":"WebApplication","applicationCategory":"UtilityApplication","description":"Encode text as Base64 strings. It supports both standard and URL-safe formats, making it useful for API integration, data transfer, and encoding checks.","name":"Base64 Encode - Convert text to Base64 format","operatingSystem":"Windows, macOS, Linux, Android, iOS"}]}
```

## Sitemap

See the full [sitemap](https://web-toolbox.dev/sitemap.md) for all pages.
