Trexmi

Base64 Encoder

Encode UTF-8 text to standard Base64 online with optional 64- or 76-character line wrapping and canonical padding.

Encode UTF-8 text to standard Base64 Optional 64- or 76-character wrapping Optional trailing padding Copy and download encoded output
Base64 is reversible encoding, not encryption. Do not use it to protect passwords, tokens, or private data.
INPUT Unicode text to encode *
0 chars0 words0 lines
Type the Unicode text that should be represented as Base64. Example: Hello, Trexmi — Привіт!

Tool settings

Ctrl / ⌘ + Enter
Base64 output Standard Base64 generated from the UTF-8 bytes of your input.
About the tool

What Base64 Encoder does

Base64 Encoder converts UTF-8 text into standard Base64. It is useful for API examples, configuration values, test fixtures, email/MIME workflows and other systems that need binary-safe text transport.

The encoder works from the UTF-8 bytes of the supplied text. You can keep canonical = padding, remove it when a destination expects unpadded Base64, or wrap long output at 64 or 76 characters per line.

Base64 is reversible encoding, not encryption. Anyone who has the encoded value can decode it.

How to use

  1. Paste text. Unicode input is encoded as UTF-8 bytes.
  2. Choose wrapping. Leave output on one line or wrap at 64/76 characters.
  3. Choose padding. Keep = for canonical Base64 unless the destination explicitly omits it.
  4. Encode. Run the tool and review the complete value.
  5. Verify. Decode the result again when exact round-trip accuracy matters.
Built for the task

Why use Base64 Encoder?

Focused controls, predictable output, and a workflow designed around this exact transformation.

01

UTF-8 aware

Unicode text is converted from its UTF-8 byte representation.

02

Wrapping control

Produce single-line output or 64/76-character wrapped Base64.

03

Padding control

Keep canonical padding or omit it when required by a destination.

04

Copy-ready result

Encoded output remains separate from the source for easy verification.

Useful answers

Questions about Base64 Encoder

Practical details about input, output, privacy, limits, and the best way to use this tool.

01 What is Base64 encoding?

Base64 represents binary bytes using a 64-character ASCII alphabet. It is designed for transport and storage, not secrecy.

02 Does Base64 encrypt my text?

No. Base64 is reversible and provides no confidentiality.

03 Why does Unicode text produce a different result than expected?

Base64 operates on bytes. Trexmi encodes the UTF-8 bytes of your text, which is the common web and API convention.

04 What does Base64 padding mean?

One or two trailing = characters complete the final 4-character Base64 group. Some protocols omit padding, while canonical Base64 keeps it.

05 Why wrap Base64 at 76 characters?

76-character wrapping is commonly associated with MIME transport. Many APIs instead expect one uninterrupted line.

06 Can I verify the output?

Yes. Paste it into the Base64 Decoder and confirm that it returns the original text.

Learn Base64

Read the complete Base64 Guide

Understand Base64 encoding, decoding, Base64URL, UTF-8 input, padding, data URLs, and frequent integration mistakes.

  • Encoding and decoding
  • Base64URL and padding
  • APIs, files, and data URLs
Read guide Practical explanations and examples

Examples

Encode plain text

Canonical padding is retained for this UTF-8 input.

Plain text input
Hello, Trexmi!
Base64 output
SGVsbG8sIFRyZXhtaSE=

Encode Ukrainian text

Unicode characters are encoded from their UTF-8 bytes.

Plain text input
Привіт, Trexmi!
Base64 output
0J/RgNC40LLRltGCLCBUcmV4bWkh

Compare padding

Removing padding changes the transport representation, not the decoded bytes.

Plain text input
Hello
Base64 output
With padding: SGVsbG8=
Without padding: SGVsbG8

Base64 encoding examples

Encode plain English text

Input: Hello, Trexmi!
Padding: enabled
Output: SGVsbG8sIFRyZXhtaSE=

Encode Ukrainian UTF-8 text

Input: Привіт, Trexmi!
Padding: enabled
Output: 0J/RgNC40LLRltGCLCBUcmV4bWkh

Encode compact JSON

Input: {"active":true}
Output: eyJhY3RpdmUiOnRydWV9

Compare padded and unpadded output

Input: Hello
With padding: SGVsbG8=
Without padding: SGVsbG8

Line wrapping and canonical padding

Single-line output is typical for APIs and configuration. A 76-character line length is common in MIME contexts, while 64-character wrapping appears in some PEM-style and legacy workflows. Wrapping changes presentation only; removing line breaks produces the same Base64 character sequence.

Canonical Base64 uses one or two trailing = characters when required by the final byte group. Omit padding only when the receiving format explicitly allows it.

Standard Base64, Base64URL, and percent encoding

Standard Base64 uses + and /. Base64URL substitutes - and _ and commonly removes padding. Encoding with this tool does not automatically produce Base64URL.

If standard Base64 must travel as a URL query value, percent-encode it rather than replacing characters by hand. Use URL Encoder for that separate transport step.

Related Trexmi tools

Verify a round trip with Base64 Decoder, encode a query component with URL Encoder, or prepare JSON source with JSON Formatter.

Reference

Base64 is specified in RFC 4648.