Base64 Encode
Convert text to standard or URL-safe Base64
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
- Enter the text you want to encode in the input area on the left.
- Turn on options such as line-by-line encoding or URL-safe conversion if needed.
- 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
hello@example.com
When you enter a string like this, the result becomes:
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.
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.