Toolsby Decyfy

Base64 Encoder & Decoder

Convert text to Base64 and back, including accented and non-Latin characters.

Uses - and _ instead of + and /, and drops the = padding. Safe to put in a URL or filename.

0 chars

What this tool does

Base64 rewrites data using only 64 safe characters — letters, digits, plus and slash. It exists because plenty of systems were built to carry text and will corrupt anything else: email bodies, URLs, JSON string fields, HTML attributes. Encoding first means the data survives the trip.

It is an encoding, not encryption. Anyone who has the string can decode it, including this page. Base64 makes data safe to transport, not private.

When you might need it

A token or key arrived Base64-encoded
JWTs, API credentials and webhook payloads often carry Base64 sections. Decoding shows you what is actually inside.
You need to embed data in text
Putting a small image or file into a JSON field, a CSS file or an HTML attribute requires it to be text first.
Something is corrupting your data in transit
If a value survives locally but arrives mangled, encoding it before sending usually fixes it.
Reading a config value
Deployment platforms and CI systems commonly store secrets Base64-encoded so they can sit in a text field.

Common workplace uses

Inspecting an auth token
Decode the payload section of a token to check which account, scope or expiry it carries.
Preparing a value for a config field
Encode a multi-line certificate or key so it fits on one line in an environment variable.
Checking a webhook body
Some providers Base64 the payload. Decoding tells you whether the problem is their data or your handler.
Passing text through a URL
The URL-safe option produces a string with no + / or = characters, so it can sit in a link or filename unescaped.

How to use it

  1. Choose a direction

    Encode turns text into Base64. Decode turns Base64 back into text.

  2. Paste your input

    For decoding, whitespace and line breaks are ignored, and missing = padding is added for you — so a string copied out of a log usually works as-is.

  3. Turn on URL-safe if the result goes in a link

    This swaps + and / for - and _ and drops the padding. Decoding accepts either form automatically.

  4. Press the button and copy the result

    Use result as input flips the direction and moves the output across, which is a quick way to confirm a round trip.

Practical tips

Base64 is not security
It is trivially reversible. Never use it to hide a password, key or anything sensitive — if it matters, it needs real encryption.
Encoded data gets about a third bigger
Three bytes become four characters. A 300 KB image becomes roughly 400 KB of Base64, which is worth knowing before you embed one.
Non-Latin text works here
The browser’s built-in Base64 function fails outright on anything beyond Latin-1. This tool encodes to UTF-8 first, so Hindi, Tamil, Chinese and emoji all survive a round trip.
If decoding says "binary data", that is the answer
It means the Base64 is valid but decodes to a file rather than text — usually an image. That is information, not a failure.
A JWT is three Base64 sections joined by dots
Decode the middle section for the payload. Decode the first for the header. The third is a signature and will look like binary, because it is.

Common questions

Is my data uploaded?
No. Encoding and decoding use built-in browser functions and this tool makes no network requests while working. Nothing you paste leaves your device — which matters when the thing you are decoding is a live token.
Is Base64 encryption?
No. It is a reversible encoding with no key and no secret. Anyone holding the string can read it. Use it to make data transportable, never to make it private.
Why did my accented or Hindi text break in another tool?
Most simple implementations call btoa directly, which throws on any character above U+00FF. This tool encodes text to UTF-8 bytes first, so the full range works.
What is URL-safe Base64?
A variant using - and _ instead of + and /, with the trailing = padding removed, so the result can go into a URL or filename without further escaping. Decoding here accepts both variants.
My Base64 has no padding — will it still decode?
Yes. Missing = characters are added back automatically. Whitespace and line breaks are also stripped, so a value copied from a wrapped log still works.
Can I encode a file?
Not in this tool — it works on text. Decoding a string that turns out to be a file is detected and reported rather than shown as unreadable characters.

Related workflows

Inspecting an auth token

Working out what a token actually contains when a request is being rejected.

  1. 🔡 Base64 EncoderDecode the payload section between the dots
  2. { } JSON FormatterFormat the decoded JSON to read the claims and expiry

Related tools

Didn’t find the tool you need?

Tell us what you’re trying to calculate — we read every one.