Skip to main content
SuperTextTools

Base64 Encoder/Decoder

Encode and decode Base64 instantly. Unicode-safe, URL-safe option, RFC line wrap. Runs entirely in your browser — your data never leaves your device.

Instant 100% Private Free Forever
Base64 Encoder Decoder Encoding Developer
Direction
Input 0 chars · 0 lines
Output
Try an example

How to use the Base64 Encoder/Decoder

Four steps to encode or decode Base64 in your browser.

  1. 1

    Paste text or Base64

    Enter plain text to encode, or paste a Base64 string to decode. Auto-detect picks the direction when the input looks like Base64.

  2. 2

    Choose Encode or Decode

    Use the direction toggle to force encode or decode if auto-detect is wrong.

  3. 3

    Set options

    Enable URL-safe output for JWTs and URLs, or line wrap at 76 characters for email-style MIME encoding.

  4. 4

    Copy or download

    Copy the result to your clipboard, download as a text file, or share a link with your input in the URL hash.

What is Base64?

Base64 is a binary-to-text encoding scheme that represents arbitrary bytes as a string of 64 printable ASCII characters: uppercase letters, lowercase letters, digits, plus + and /, with = used for padding. It was designed in the early days of email and MIME so binary attachments could survive transport through systems that only allowed 7-bit text. Today, Base64 is everywhere — from JWT tokens and HTTP Basic Auth headers to data URLs in CSS and JSON payloads that embed small files.

A Base64 encoder takes raw bytes (from text, images, or any file) and expands them into a safe ASCII string roughly 33% longer than the original. A Base64 decoder reverses the process. The encoding is fully reversible and deterministic — the same input always produces the same output — but it is not encryption. Anyone can decode Base64 without a key. Treat it as a transport format, not a security layer.

Text

Hello

Base64

SGVsbG8=

Why does Base64 exist?

Many protocols and storage formats were built for text only. SMTP email, early XML, and JSON cannot safely carry raw binary — null bytes, control characters, and non-ASCII bytes break parsers or get corrupted in transit. Base64 solves this by mapping every 3 bytes of input to 4 characters from a safe alphabet. The cost is size: encoded data is about 33% larger. For small strings like credentials or tokens, that overhead is negligible. For multi-megabyte files, dedicated binary channels (file upload, S3, attachments with binary MIME) are more efficient.

Common use cases

  • Email attachments (MIME). Files are Base64-encoded inside the message body, often with line wraps every 76 characters per RFC 2045.
  • Data URLs. Inline images in HTML or CSS use data:image/png;base64,… so the browser does not need a separate HTTP request.
  • JWT tokens. Header and payload segments are URL-safe Base64-encoded JSON. The signature is separate — Base64 carries the data, not the security.
  • HTTP Basic Auth. Usernames and passwords are joined with a colon and encoded as Authorization: Basic …
  • APIs and config. Small binary blobs, certificates, and keys are often stored as Base64 strings in JSON or YAML files.

Base64 is not encryption

This is the most common misconception. Encoding transforms representation; encryption requires a secret key and is meant to prevent reading. If you Base64-encode a password and paste it into a config file, anyone who finds the file can decode it in one click — including with this free decode Base64 online tool. For secrets, use proper encryption (AES, libsodium) or a secrets manager. Use Base64 when you need binary-safe text, not when you need confidentiality.

Why use an online Base64 tool?

Command-line tools like base64 and language libraries work well in scripts, but a browser-based text to Base64 converter is faster for quick checks: paste an API token, verify a data URL, decode a header value, or confirm that your UTF-8 emoji survive encoding. SuperTextTools runs the conversion locally with TextEncoder so Japanese, emoji, and accented characters encode correctly — unlike naive btoa() calls that throw on Unicode. Whether you need to encode Base64 online for a quick test or Base64 to text for debugging, the result stays on your device.

Frequently asked questions

Is Base64 encryption?
No. Base64 is encoding, not encryption. It converts binary data into printable ASCII characters so it can travel through text-only systems (email, JSON, URLs). Anyone can decode it instantly — there is no secret key. Do not use Base64 to hide sensitive data.
Why does Base64 output end with =?
The equals sign is padding. Base64 encodes every 3 bytes of input as 4 characters. When the input length is not a multiple of 3, the encoder adds one or two = characters at the end so the output length stays a multiple of 4. Decoders ignore extra padding, but the standard format includes it.
What's URL-safe Base64?
Standard Base64 uses + and /, which have special meaning in URLs. URL-safe Base64 (RFC 4648) replaces them with - and _ and often omits padding. Enable the checkbox here when encoding for query strings or JWT segments.
Can Base64 handle emoji and Unicode?
Yes — when encoding is done correctly. Raw btoa() only accepts Latin-1 and fails on emoji or characters like 日本語. This tool uses TextEncoder and TextDecoder so UTF-8 text of any language encodes and decodes reliably.
Is my data sent to a server?
No. Encoding and decoding run entirely in your browser with JavaScript. Nothing you paste is uploaded, logged, or stored. Open DevTools → Network while using the tool and you will see zero requests to a backend.