Skip to content
Shrake DevTools
  • JSON FormatterData & Format
  • JSON ValidatorData & Format
  • JSON MinifierData & Format
  • JSON ↔ YAML ConverterData & Format
  • Base64 Encoder / DecoderData & Format
  • URL Encoder / DecoderData & Format
  • UUID GeneratorData & Format
  • Unix Timestamp ConverterData & Format
↑ ↓ to navigate↵ to openEsc to close

Base64 Encoder / Decoder

Encode text to Base64 and decode Base64 to text, with UTF-8 and URL-safe support.

Runs locally in your browser. Your input is not uploaded.Free, no sign-up

Text

Base64

How to use the Base64 encoder and decoder

  1. Choose Encode to turn text into Base64, or Decode to turn Base64 back into text.
  2. Type or paste your input. The result updates instantly.
  3. Tick URL-safe to use - and _ instead of + and /, without = padding, as used in JWTs and URLs.
  4. Use Swap to feed the result back in and reverse the direction.

Full UTF-8 support

Text is encoded as UTF-8 first, so accented letters, Chinese, Japanese and emoji all work. The browser's built-in btoa() throws an error on these characters.

When decoding, standard and URL-safe Base64 are both accepted, line breaks are ignored and missing = padding is added for you. If the decoded bytes aren't text (for example an image), you'll be told instead of seeing garbled characters.

Examples

  • hello → aGVsbG8=
  • héllo → aMOpbGxv
  • {"alg":"HS256"} → eyJhbGciOiJIUzI1NiJ9 (the start of many JWTs)

Frequently asked questions

Is Base64 encryption?

No. Base64 is an encoding: anyone can decode it without a key. Never use it to hide passwords, tokens or secrets. Kubernetes Secrets, for example, are only Base64-encoded, not encrypted.

Is my data uploaded?

No. Encoding and decoding happen entirely in your browser.

Why is Base64 larger than the original?

Base64 represents every 3 bytes as 4 characters, so encoded data is about 33% larger.

What is URL-safe Base64?

A variant (RFC 4648 §5) that replaces + with - and / with _, and usually drops the = padding, so the result can be used in URLs, filenames and JWTs without escaping.