Base64 Encoder Online

Base64 Encoder / Decoder

Encode plain text to Base64 or decode Base64 payloads instantly with UTF-8 support.

Base64 Encoder Online workspace

Loading interactive tool...

Encode plain text to Base64 or decode Base64 payloads instantly with UTF-8 support. Ideal for API debugging, JWT segment inspection, and quick data conversion without leaving the browser.

Related developer tools

Encoding & URLs

Continue your workflow with these free utilities on conversion tools and adjacent tasks—all browser-based, no upload required.

Browse all developer tools →

What Base64 encoding is and when to use it

Base64 represents binary data as ASCII text using sixty-four safe characters plus padding. It is not encryption—anyone can decode Base64 back to the original bytes. Engineers use it when binary data must travel through JSON, email, URLs, or other text-first channels. Common examples include embedding small images in data URLs, serializing credentials for HTTP Basic authentication, and transporting binary keys in configuration files.

UTF-8 awareness matters for international text. A proper Base64 encoder converts Unicode strings to bytes before encoding; decoding reverses that process. Tools that treat input as Latin-1 can corrupt emoji or non-Latin scripts. This encoder and decoder handle UTF-8 explicitly so your payloads round-trip correctly across modern applications.

Base64 encode versus decode workflows

Encoding starts with readable text or byte sequences and produces a safe ASCII string you can paste into headers, environment variables, or databases. Decoding starts with Base64 text and restores the original content—often JSON, XML, or binary signatures. Switch modes based on direction; mixing them on the same string produces garbage or errors, which is a useful signal that the input was already decoded.

When inspecting JWTs, remember tokens use Base64url, which swaps +/ for -_ and may omit padding. Dedicated JWT decoders handle that variant automatically. Use this Base64 tool for standard Base64 and for learning how encoded credentials or config values map back to plaintext during incident response.

URL-safe Base64 and padding explained

Standard Base64 uses + and /, which conflict with URL parsing. URL-safe variants replace them with - and _. Padding equals signs align output to four-character blocks; some protocols strip padding while others require it. Decoders should tolerate missing padding by inferring boundaries from length modulo four.

If decoded output looks truncated, verify you copied the entire string and selected the correct alphabet. Line breaks in PEM files are not part of the payload—remove whitespace before decoding unless the tool strips it automatically. For large files, prefer streaming CLI utilities; this browser tool targets quick conversions during development.

Security considerations for encoded secrets

Encoding does not protect secrets. Treat Base64 as a transport representation, not access control. Rotate API keys if they were exposed in tickets, chats, or screen shares—even if encoded. When debugging Basic auth headers, decode locally, fix the issue, and avoid pasting live credentials into shared documents.

Malware analysts and security engineers decode suspicious strings locally to inspect payloads without executing them. Developers do the same for config mistakes. Always follow organizational policies about handling customer data; local processing reduces third-party risk but does not eliminate classification requirements.

Pairing Base64 tools with JWT, JSON, and URL utilities

Authentication debugging often chains tools: decode a JWT header, Base64-decode a separate attachment, then format JSON from the result. URL encoders help when Base64 strings travel inside query parameters and need percent escaping afterward. UUID generators create test identifiers once you confirm payload structure.

Document expected encoding for each integration point in your API style guide—standard versus URL-safe, padding rules, and charset defaults. Consistency prevents subtle production bugs when services written in different languages exchange encoded values.

How it works

  1. 1Switch between encode and decode mode depending on your workflow.
  2. 2The tool handles UTF-8 text safely before converting to or from Base64.
  3. 3Use the copy action to move the transformed output into your app or request inspector.

Examples

Encode a credential string

developer:super-secret-token
ZGV2ZWxvcGVyOnN1cGVyLXNlY3JldC10b2tlbg==

Decode a Base64 JSON attachment

eyJuYW1lIjoiQXZhIiwicm9sZSI6ImFkbWluIn0=
{"name":"Ava","role":"admin"}

Encode Unicode text safely

Hello 世界 🚀

Decode a URL-safe Base64 sample

dGV4dC13aXRoLWh5cGhlbnM

When to use this tool

  • Decode Base64 segments from JWT headers or attachments during auth debugging.
  • Encode UTF-8 text for HTTP Basic credentials or test fixtures.
  • Inspect Base64-wrapped configuration values from environment exports.
  • Convert Unicode strings safely without charset corruption.
  • Verify round-trip encoding before embedding data URLs in HTML or CSS.
  • Teach encoding concepts without installing command-line utilities.

Frequently asked questions

Does this support Unicode text?

Yes. Encoding and decoding use UTF-8 so emoji and non-Latin characters survive round trips.

Is URL-safe Base64 supported?

The decoder tolerates common URL-safe variants by normalizing characters before decoding. For JWT-specific Base64url, use the JWT decoder for best results.

Where is my input processed?

All conversion runs locally in your browser. Nothing is uploaded to a server.

Is Base64 the same as encryption?

No. Base64 is an encoding. Anyone can decode it without a secret key.

Why does decoding fail?

Invalid characters, incorrect padding, or truncated input cause failures. Verify the alphabet and copy the full string.

Can I encode binary files?

This tool focuses on text. For large binaries, use filesystem or CLI tools optimized for streaming.

How do I encode credentials for Basic auth?

Encode the username:password string, then place the result in an Authorization header per RFC guidelines. Never commit live credentials to repositories.

Does encoding change the length of data?

Base64 expands data by roughly one-third because each three bytes become four characters.