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.
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
Choose a direction
Encode turns text into Base64. Decode turns Base64 back into text.
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.
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.
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?
Is Base64 encryption?
Why did my accented or Hindi text break in another tool?
What is URL-safe Base64?
My Base64 has no padding — will it still decode?
Can I encode a file?
Related workflows
Inspecting an auth token
Working out what a token actually contains when a request is being rejected.
- 🔡 Base64 EncoderDecode the payload section between the dots
- { } JSON FormatterFormat the decoded JSON to read the claims and expiry