DataFormatter

Base64 Decoder

Decode Base64 back to plain text or JSON online, free and instantly. Paste a Base64 string into the live tool below and it converts back to readable text in your browser — never uploading your data.

About this tool

What is it?
DataFormatter Base64 Decoder is a free online tool that turns a Base64 string back into readable text, automatically pretty-printing any embedded JSON it finds.
Who is it for?
Developers debugging encoded payloads, auth strings or base64-wrapped data who want the decoded result instantly and safely.
What makes DataFormatter's tool different?
It auto-detects embedded JSON and pretty-prints it, and decoding happens entirely in your browser with nothing sent to a server.

Input

Paste or type JSON, Base64, or plain text…

Paste or click a sample above — it will be detected automatically.

Quick start

  1. Paste the Base64 string above — line breaks are handled automatically.
  2. The decoded text appears instantly; embedded JSON is pretty-printed.
  3. Copy the result or download it as a file.

How Base64 decoding works

Decoding reverses the Base64 process: the tool validates the 64-character alphabet, restores padding when it is missing, converts the characters back to raw bytes, and then decodes those bytes as UTF-8 text.

If the resulting text is valid JSON, DataFormatter detects it and pretty-prints it automatically — handy when you receive Base64-wrapped API payloads or configuration and want to read them immediately.

Base64 input
SGVsbG8sIERhdGFGb3JtYXR0ZXIh
Decoded text
Hello, DataFormatter!

How to decode Base64 online

  • Paste the Base64 string you received from an API, header, or config into the editor above.
  • The decoded text appears instantly, pretty-printed if it is JSON.
  • Whitespace and line breaks inside the Base64 are handled automatically.
  • Copy the result or download it as a file.

When you'll need a Base64 decoder

Inspecting wrapped API payloads

Gateways love wrapping request bodies in Base64. Decode here to read what actually went over the wire — with JSON auto-formatted.

Debugging auth headers & JWT parts

Basic auth credentials and JWT segments are just base64url text. Paste a segment to read it, or take a whole token to the JWT Decoder.

Recovering values from configs

Environment variables often hide Base64 blobs — secrets, connection strings, feature payloads. Read them safely without shell gymnastics.

Decoding errors explained

Invalid Base64 character

Why: The input contains characters outside the alphabet — often a copied label, quotes around the value, or URL-encoded %3D where = should be.

Fix: Strip surrounding quotes and labels; if you see %XX sequences, run the string through the URL Decoder first.

Decodes but shows replacement characters (�)

Why: The underlying bytes aren't UTF-8 — the data was likely binary (an image) or encoded from another character set.

Fix: Treat it as binary via the Base64 Tools hub rather than forcing it through a text decoder.

Nothing happens when I paste

Why: Auto Detect didn't recognise the shape of the input as Base64-like (for example, plain English words also match the alphabet).

Fix: Pick Base64 Decode explicitly from the tool menu so the decoder runs regardless of detection heuristics.

Pro tips

  • Decoding a JWT payload? The dedicated JWT Decoder splits header and payload for you and tolerates the Bearer prefix.
  • If decoded output is JSON, Split view shows raw bytes-in/text-out on one screen while you compare sources.
  • Use Restore Original after experimenting to get back the exact encoded string you started with.
  • Long single-line strings? Toggle word wrap so you can eyeball the entire value without scrolling sideways.

Decoder glossary

base64url
A URL-safe variant of Base64 that replaces + with - and / with _, used by JWTs and web-safe identifiers. It omits padding more often than not, which tolerant decoders restore automatically before decoding.

Frequently asked questions

Why won't my Base64 string decode?

Decoding requires valid Base64 characters (A–Z, a–z, 0–9, +, /) with correct padding. Invalid characters, missing padding, or data that is not valid UTF-8 text will produce an error rather than garbage output.

Can it decode Base64 that contains JSON?

Yes. If the decoded bytes are valid JSON, the tool pretty-prints it automatically so you can read the structure instantly.

Does Base64 decoding work on private or sensitive data?

Yes — everything is decoded locally in your browser. Nothing you paste is uploaded, so it is safe for sensitive payloads.

What about base64url (with - and _ instead of + and /)?

JWTs and URL-safe variants swap the last two alphabet characters. This decoder accepts both spellings, so tokens and URL-safe strings decode without manual character replacement.

Why does my decoded output end with strange characters?

The bytes probably weren't UTF-8 text to begin with — for example an encoded image or a file. Text decoders can only show text; use the Base64 Tools hub for binary formats like images.

Related tools