FormatNest
🔒 Processed in your browser — file never uploaded | No account needed for first 10 conversions | 100% free · no watermarks |
★★★★★4.8(2,400+ users)

Data and text tool

Base64 Encode/Decode

Encode text or data to Base64, or decode Base64 strings back to plain text. Runs entirely in your browser — nothing is sent to a server.

Base64 Encode Decode

For server-powered tools, log in first so the conversion can be processed securely.

Download

Ready. Upload a file or enter a value to begin.

Advertisement

Complete guide

How to use Base64 Encode/Decode

Developer tools guide for base64 encode/decode users.

Base64 is an encoding scheme that converts binary data into a string of ASCII characters. It's used extensively in web development: embedding images in CSS, encoding email attachments, passing binary data in JSON APIs, and storing small assets inline in HTML.

This tool handles both directions: paste plain text or a data URI and encode it, or paste a Base64 string and decode it back. URL-safe Base64 (which replaces + with - and / with _) is also supported via the toggle.

What this tool does

Encodes plain text or binary strings to Base64 and decodes Base64 back to readable text. Supports standard and URL-safe Base64 variants.

How to use it

Paste your input into the text area. Click Encode or Decode. Copy the result. Toggle URL-safe mode for use in URLs or filenames.

Best practices

Base64 increases data size by ~33%. Don't use it to 'encrypt' data — it's an encoding, not encryption, and is trivially reversible by anyone.

Quick checklist

  • Use Encode for text → Base64; use Decode for Base64 → text.
  • For URL embedding, enable URL-safe mode (replaces + and / with - and _).
  • Base64 is not encryption — don't use it for passwords or secrets.
  • Data URIs start with 'data:image/png;base64,' — paste the full string to decode embedded images.

Answers

Base64 Encode/Decode FAQs

Is Base64 the same as encryption?

No. Base64 is an encoding scheme — anyone can decode it without a key. Never use it for passwords or sensitive data.

Why does Base64 output end with == sometimes?

Base64 encodes in 3-byte chunks. When input length isn't divisible by 3, = padding is added to complete the final chunk.

What is URL-safe Base64?

Standard Base64 uses + and / which are special characters in URLs. URL-safe Base64 replaces them with - and _ so the string can be used safely in a URL.

Can I encode images to Base64?

Yes — use the Image to Base64 tool for that. It accepts image files and outputs a ready-to-use data URI.