Base64 Encoder/Decoder

Encode and decode Base64 strings. Supports text and file input. Pure client-side.

Input chars: 0
Output chars: 0
File size (decoded): 0 B

Encoding Β· Base64 Β· data URLs

Encode text to Base64 or decode Base64 back to text in your browser. Handy for data URLs, debugging Basic auth headers, and inspecting encoded config blobs β€” with a clear reminder that Base64 is not encryption.

Encode & decode Text workflows Client-side only Instant copy No sign-up

What Base64 actually does

Base64 represents binary data using 64 ASCII characters (A–Z, a–z, 0–9, +, /, with = padding). It exists so binary can travel through systems that expect text: MIME email, XML/JSON string fields, and HTTP headers. Encoded output is about 33% larger than the input.

Anyone can decode Base64. It provides zero confidentiality. If you need secrecy, use real encryption and a proper key management story β€” not btoa.

Not encryption. β€œHidden” API keys in Base64 are still public to anyone who decodes them. Treat Base64 as transport packaging only.

How to use this tool

  1. Paste plain text to encode, or paste a Base64 string to decode.
  2. Run encode or decode and inspect the result.
  3. Copy into a data URL, header, or config as needed.
  4. For JWTs and some URL contexts, note Base64url uses - and _ instead of + and /, often without padding β€” different alphabet, same idea.

Common use cases

Example

Input:  DevToolBox
Base64: RGV2VG9vbEJveA==

Basic auth material:
  user:pass  β†’  dXNlcjpwYXNz
  Header:    Authorization: Basic dXNlcjpwYXNz

Standard vs URL-safe

VariantAlphabet notesWhere you see it
Standard+ / and = paddingMIME, many APIs, classic btoa
Base64url- _, padding often omittedJWTs, some query params

FAQ

Why is the output longer than the input?

Base64 encodes 3 bytes as 4 characters (~4/3 size), plus optional padding. That expansion is expected.

Can I encode files?

This page focuses on text workflows in the textarea. For large binaries, use local CLI tools (base64 on macOS/Linux) to avoid huge browser strings.

Is my data uploaded?

No β€” encode/decode run in the browser. Privacy Policy.

Related tools

Sponsored