Base64 Decode

Decode Base64 strings back to readable text. Free online Base64 decoder tool.

Runs locally in your browser
Input1 lines · 28 chars
Loading editor…
Output0 lines · 0 chars
Loading editor…

What is Base64 Decode?

Base64 decoding reverses the encoding process, converting a Base64 string back into its original text or binary representation. Every developer eventually encounters encoded data in API responses, HTTP headers, configuration files, database columns, and log entries — decoding reveals the human-readable content hidden beneath the ASCII wrapper.

Standard Base64 uses the characters A–Z, a–z, 0–9, plus, slash, and equals signs for padding. URL-safe variants substitute hyphen and underscore for plus and slash. Our decoder handles both formats and reports clear errors when input contains invalid characters, wrong padding, or truncated data.

Decoding is essential for inspecting JWT token payloads, reading Basic Authentication credentials in proxy logs, recovering text from data URIs, and debugging file upload APIs that transmit binary content as encoded strings. Without a reliable decoder, these debugging tasks require command-line tools or writing throwaway scripts.

All decoding runs locally in your browser. Encoded strings from production logs, authentication systems, and internal APIs stay on your machine. No server receives your input, eliminating the risk of credential leakage through third-party decode services.

Decoding pairs naturally with Base64 Encode for round-trip verification. For JWT-specific workflows, use the JWT Decoder which automatically splits and decodes token segments.

When should you use Base64 Decode?

Inspect JWT access tokens during authentication debugging. While the JWT decoder provides structured output, raw Base64 decoding of individual segments helps when tokens use non-standard claim formats or custom encoding.

Read Basic Authentication credentials from HTTP Authorization headers captured in proxy tools like Charles, Fiddler, or browser network tabs. Decode the Base64 portion after the 'Basic ' prefix to reveal username:password.

Recover original text from data URIs in HTML or CSS. Strip the data:mime/type;base64, prefix and decode the remaining string to view or save the embedded content.

Debug encoded fields in API responses, webhook payloads, or database records where vendors store binary attachments or serialized data as Base64 strings.

How to Use Base64 Decode

  1. Paste a Base64 string into the input.
  2. Click Decode to convert to readable text.
  3. View or copy the decoded output.
  4. Use decoded text in your application or debugging.

Features

  • Decode Base64 strings to readable UTF-8 text instantly
  • Support for standard and URL-safe Base64 alphabets
  • Clear error messages for invalid characters and padding issues
  • One-click copy of decoded output for further use
  • No server round-trips — fully private local decoding
  • Handles Unicode content correctly after UTF-8 byte recovery
  • Instant results with no sign-up or rate limits
  • Works with encoded strings from any source or tool

Example

The encoded input SGVsbG8sIFF1aWNrRm9ybWF0IQ== maps back to the UTF-8 bytes of 'Hello, QuickFormat!'. The trailing equals signs are padding that align the byte groups during encoding. Successful decoding confirms the string was valid Base64. If the input were truncated or contained invalid characters, the decoder would report a specific error instead of producing garbled output.

Base64 String

SGVsbG8sIFF1aWNrRm9ybWF0IQ==

Decoded Text

Hello, QuickFormat!

Common Errors

Invalid characters in input

Base64 only allows A-Z, a-z, 0-9, +, /, and = padding. Spaces, newlines, or typos cause decode failure.

Fix: Remove whitespace and verify the string contains only valid Base64 characters.

Incorrect padding

Base64 strings must have padding length divisible by 4. Missing or extra equals signs corrupt the output.

Fix: Add padding equals signs until the string length is a multiple of 4.

URL-safe vs standard alphabet mismatch

Strings encoded with URL-safe Base64 use - and _ instead of + and /, which standard decoders may reject.

Fix: Convert URL-safe characters back to standard alphabet before decoding, or use a URL-safe aware decoder.

Decoded binary displayed as garbled text

Decoding image or file data produces binary bytes that are not valid UTF-8 text, showing as replacement characters.

Fix: Recognize that the input was binary data; save decoded bytes as a file rather than displaying as text.

Double-encoded strings

Some systems encode already-encoded data, so one decode pass reveals another Base64 string instead of plain text.

Fix: Decode repeatedly until output is no longer valid Base64 or readable text is obtained.

Best Practices

  • Strip whitespace and line breaks from encoded strings before decoding
  • Decode locally when input may contain credentials or sensitive tokens
  • Verify round-trip by re-encoding decoded output and comparing to original
  • Identify URL-safe Base64 by presence of - and _ characters before decoding
  • Use the JWT decoder for structured token inspection instead of manual segment decoding
  • Save binary decode results as files rather than expecting readable text output
  • Document which Base64 variant your APIs use in integration specifications
  • Never assume decoded content is safe to display — it may contain binary or malicious data

Related Tools

Frequently Asked Questions

You will see a clear error message explaining what went wrong. Common issues include invalid characters, incorrect padding, and truncated strings. Verify the input was not corrupted during copy-paste or URL transmission.