Something wrong with this tool?

About TEXT To BASE64 Converter Online

This tool encodes text to Base64 — a binary-to-text encoding that represents arbitrary bytes using 64 printable ASCII characters. The output is safe to embed in URLs, email bodies, HTTP headers, JSON payloads, and other contexts where binary or special characters would cause problems.

Base64 is not encryption. The encoded form looks unreadable but it's a public, reversible transformation — anyone can decode it. Don't use it to protect secrets, but do use it to transport binary or non-ASCII content through ASCII-only channels.

The tool supports UTF-8 input, so non-Latin scripts encode correctly. It also offers URL-safe Base64 (uses - and _ instead of + and /) for use in URL query strings and tokens.

How to use this tool

How to encode text to Base64

  1. Paste the source text

    Put plain text into the "Text" field. Any characters are accepted — emoji, non-Latin scripts, control characters. The tool treats it as UTF-8.

  2. How the encode works

    Internally: `Buffer.from(text, 'utf8').toString('base64')`. The output uses the standard Base64 alphabet (A–Z a–z 0–9 + / =) with padding, not URL-safe.

  3. Press Run

    Output is a single `base64` field — the encoded string. There are no options for line wrapping, MIME spacing, or URL-safe substitution.

  4. Use it where Base64 is expected

    Common targets: `data:` URLs, HTTP Basic auth headers, JSON-embedded binary, mail attachments. If the receiver wants URL-safe encoding, replace + with - and / with _ after copying.