...
Contact Us Contact Us

Base64 Encoder & Decoder Tool

Text to encode
Result
Result will appear here.

What is the Base64 Encoder / Decoder?

The Base64 Encoder / Decoder converts text or a file into Base64, and turns Base64 back into text or a file you can download. It handles UTF-8 correctly (so accented characters and emoji round-trip), offers the URL-safe alphabet used in tokens and query strings, and shows the size before and after so you can see the 33 percent overhead Base64 adds. Everything runs in your browser; a secret you paste is never sent anywhere.

How to use it

  1. Choose Encode or Decode.
  2. Paste text, or drop a file. For encoding an image you get a data URI you can paste straight into CSS or HTML.
  3. Toggle URL-safe if the value is going into a URL or a JWT.
  4. Click Convert, then Copy or Download.

What Base64 is, and what it is not

Base64 represents binary data using 64 printable characters so it can travel through systems built for text: email attachments, JSON fields, HTML attributes, HTTP headers. It is an encoding, not encryption. Anyone can decode it instantly, so it provides no secrecy; “the password is Base64 encoded” means it is stored in plain sight. Where you will meet it, how padding and the URL-safe variant work, and why it is not a security measure, is in Base64 explained: what it is, where you’ll meet it, and why it isn’t encryption.

Common uses

  • Data URIs: embed a small icon or font directly in CSS to save a request.
  • Basic authentication: the Authorization header carries username:password in Base64.
  • JWTs: header and payload are URL-safe Base64; decode them here to read the claims.
  • Email: attachments are Base64 inside MIME.
  • APIs: binary fields (images, PDFs) in JSON are almost always Base64.

Tips

  • Data URIs make sense under a few kilobytes; larger images should stay as files so they can be cached.
  • If decoding produces garbage, the input may be URL-safe Base64 (with – and _), or may have been double-encoded.
  • Missing padding (=) at the end is tolerated by this tool but rejected by some strict decoders.

Related tools

Pretty-print the JSON you decoded with the JSON Formatter, test a pattern against the output with the Regex Tester, and convert between number bases with the Binary to Decimal Converter.

Read the guide

Base64 Explained: What It Is, Where You’ll Meet It, and Why It Isn’t Encryption

Base64 is not encryption; it's a way to write bytes as text. How the encoding works, the URL-safe and MIME variants, where you'll meet it (data URIs, JWTs, Basic auth, email), when to use it, and how to decode what you find.

Frequently asked questions

Is Base64 secure?

No. It is reversible by anyone. Use real encryption for secrets.

Why is the output longer than the input?

Base64 uses 4 characters for every 3 bytes, so output is about a third larger.

Can I encode a file?

Yes. Drop it in; the tool reads it locally and gives you the Base64 string or a data URI.

Is my data stored?

No. Nothing leaves your browser.

Seraphinite AcceleratorOptimized by Seraphinite Accelerator
Turns on site high speed to be attractive for people and search engines.