Base64 Encode / Decode

Developer & Data

Encode text to Base64 or decode it back.

Options

Mode

Text input

Base64 output

0 characters in · 0 out. Processed entirely in your browser.

What is Base64 Encode / Decode?

Base64 Encode / Decode converts text to Base64 and back with correct UTF-8 handling, so emoji, accents, and non-Latin scripts survive the round trip intact. Switch between Encode and Decode with one click, and turn on URL-safe mode to produce Base64 that uses - and _ with no padding — the variant used in tokens, JWTs, and query strings. Invalid Base64 shows a clear error instead of garbled output. Everything runs in your browser, so your text is never uploaded.

How to use Base64 Encode / Decode

  1. Pick Encode or Decode

    Choose Encode to turn plain text into Base64, or Decode to turn Base64 back into text. The input and output labels update to match.

  2. Enter your text

    Type or paste into the input box, or use Load file to open a .txt file. The result updates live as you go.

  3. Toggle URL-safe if needed

    Turn on URL-safe to use the -_ alphabet and drop = padding, which is required for URLs, cookies, and JWT segments. When decoding, the tool accepts both standard and URL-safe input and restores any missing padding.

  4. Handle errors

    If you try to decode text that isn't valid Base64, or the bytes aren't valid UTF-8, a red message explains exactly what went wrong.

  5. Copy or download

    Use Copy to grab the result, or Download to save it as encoded.txt or decoded.txt.

Common uses

  • Encode text for embedding in JSON, XML, or data URIs
  • Decode a Base64 string from an API response or config file
  • Read the payload of a JWT by decoding its URL-safe segments
  • Prepare URL-safe tokens that travel cleanly in query strings
  • Inspect Base64-encoded credentials or headers during debugging
  • Convert text with emoji or accented characters without corruption

Why choose FreeTools

100% private

Your files are processed inside your browser and are never uploaded to a server.

Free, no account

No sign-up, no watermark, no paywalled “premium” tier. Just open a tool and use it.

Instant

No upload, no queue, no server round-trip — work starts the moment you drop a file.

Runs in your browser

Built on open web standards. Works on any modern desktop browser, nothing to install.

No upload size caps

Nothing leaves your device, so there’s no server file-size limit — only your machine’s memory.

Yours to keep

Results download straight to your device in clean, standard file formats.

Frequently asked questions

Related tools