Skip to content
StackPulse
Advertisement320×50 → 728×90 responsive

Base64 Encoder / Decoder

Encode text and files to Base64 - or decode them back.

Free - No upload100% localInstant results
Input Output
24 chars
Text or file → Base64 string
Text or file
Base64 output
SGVsbG8sIFN0YWNrUHVsc2U=
Advertisement300×600 · Skyscraper

O que é o Base64 Encoder / Decoder e para que serve?

Base64 is the workhorse encoding for embedding binary data in text-based protocols: inline images in HTML emails, authentication tokens, data URIs in CSS, and payloads in JSON that must survive transport over systems that only handle printable ASCII. Instead of a raw stream of bytes, you get a compact string of letters, digits and symbols that any text channel — headers, query strings, chat messages — can carry safely.

An encoder/decoder lets you go both ways. Encode plain text, or a binary file, into a Base64 string with a single action, or decode an encoded string back into the original text so you can inspect what a token or inline asset actually contains. Decoding is also the first step when debugging cached or embedded content that is not rendering.

Both directions run entirely in your browser. That matters because tokens and encoded payloads frequently contain sensitive information — credentials embedded in configs, signed JWTs, private data URIs. Encoding or decoding them locally means the strings never travel to a third-party server, which is exactly the behaviour you want when you are inspecting unfamiliar input.

Como usar

  1. Switch between the Encode and Decode modes with the toggle at the top of the panel.
  2. Type or paste your text, or use the file picker to load a binary in encode mode.
  3. Press Run or Ctrl / ⌘ + Enter to process the input instantly.
  4. Review the resulting string or decoded text in the output pane.
  5. Copy the result to the clipboard or download the decoded binary as a file.

Exemplo prático

Um exemplo real de entrada e da saída gerada pela ferramenta:

Input

Hello, StackPulse

Output gerado

SGVsbG8sIFN0YWNrUHVsc2U=

Casos de uso comuns

Encode text or small binaries before embedding them in JSON, YAML and data URIs
Decode JWT segments and API tokens to inspect their contents during debugging
Prepare images and assets as Base64 for CSS, HTML emails or thumbnails
Encode config secrets for quick transport through systems that only accept text

Dicas de boas práticas

Remember that Base64 is not encryption — never use it to hide secrets, only to transport them safely.
Strip whitespace when pasting an encoded value, because line breaks inside a token are invalid in most HTTP headers.
Prefer a data URI over a huge Base64 blob in HTML: it removes a network request but blocks rendering until the payload is decoded.

Limitações técnicas

Base64 is an encoding, not encryption: any Base64 string can be decoded by anyone. Never treat it as a way to protect a password or an API key.
Encoding inflates the payload by roughly 33% (plus padding), so it is not a compression technique and large binaries should be compressed before being encoded.
The decoder is strict: it rejects characters outside the Base64 alphabet and reports malformed padding instead of silently ignoring it, which means it will not repair a corrupted payload.
URL-safe Base64 (with - and _ instead of + and /) is not produced by default, because the standard alphabet is what most HTTP and cookie contexts expect.
Only one file is processed at a time, and the browser's File API reads the file entirely into memory before converting it.

Perguntas Frequentes (FAQ)

Is Base64 encryption?

No. Base64 is an encoding, not encryption. Anyone can decode it. Treat Base64 strings as plaintext and avoid putting genuine secrets in them.

Does this tool handle binary files?

Yes. In encode mode you can select a file and it is converted to a Base64 string in the browser. In decode mode the result of binary content can be downloaded back as a file.

Is my string sent to a server?

Never. Encoding and decoding use native browser APIs locally, so the content you process stays on your device at all times.

Why does my encoded string end with an equals sign?

The trailing = characters are padding. Base64 works on blocks of three bytes, so the final block is padded to a multiple of four whenever the input length is not divisible by three.

Can I decode a JWT with this tool?

You can decode the Base64url segments of a JWT to read the header and payload, but you cannot verify its signature without the signing key — treat the decoded content as untrusted input.

AdvertisementResponsive · 300×250 → 728×90

Related tools

View all