Free β€’ Fast β€’ Privacy-first

Base64 to JSON Decoder

Decode Base64 to JSON instantly. Decode JWT token payloads, API responses, and Base64-encoded JSON data. Supports URL-safe Base64 decoding and automatic data URI prefix removal. Perfect for developers working with JWT tokens and Base64-encoded JSON.

Output
JSON
Mode
In-browser
Time
Instant
Price
Free
πŸ”‘

JWT Token Decoder

Decode JWT token payloads from Base64. Extract and view JSON data from authentication tokens instantly.

πŸ”—

URL-Safe Base64

Auto-detect and decode URL-safe Base64 strings. Handles - and _ characters automatically.

πŸ”’

100% Private

Everything runs locally in your browser. Your Base64 data never leaves your device.

Decode Base64 to JSON online

Paste your Base64 string, configure options, and get formatted JSON output.

Convert - and _ to + and /.

Remove data:application/json;base64,

Privacy-first

All decoding happens locally. No uploads.

What is Base64 Decoding?

Understanding how Base64 decoding converts encoded strings back to readable JSON data

Base64 decoding is the reverse process of Base64 encoding. It converts Base64-encoded strings (which use 64 ASCII characters: A-Z, a-z, 0-9, +, /) back into their original binary or text format. When decoding Base64 to JSON, the tool first converts the Base64 string back to bytes, then decodes those bytes to text using UTF-8, and finally validates and formats the result as JSON.

When you decode Base64 to JSON, the tool reverses the encoding process: it takes the Base64 characters, converts them back to bytes (each 4 Base64 characters represent 3 bytes), decodes the bytes to text using UTF-8 encoding, and then parses and formats the text as JSON. This is essential for reading JWT token payloads, API responses, and any Base64-encoded JSON data.

Base64 Encoded String

eyJ1c2VyIjogImpvaG4iLAogInRva2VuIjogImFiYzEyMyJ9

69 bytes (Base64-encoded)

Decoded JSON

{
  "user": "john",
  "token": "abc123"
}

52 bytes (human-readable JSON)

How Base64 Decoding Works

The decoding process reverses Base64 encoding: it groups Base64 characters into sets of four (representing 24 bits total), converts each 6-bit group back to its original byte value, and reassembles the bytes into the original data. If padding characters (=) are present, they indicate how many bytes were in the final group during encoding.

For Base64 to JSON conversion, this means your Base64-encoded string (which may have been created from JSON data) is decoded back to text, validated as JSON syntax, and formatted for readability. This is why Base64 decoding is essential for JWT tokens, where the payload section is Base64-encoded JSON that needs to be read and verified.

URL-Safe Base64 Decoding

URL-safe Base64 uses - and _ instead of + and / to avoid URL encoding issues. When decoding URL-safe Base64, these characters must be converted back to + and / before standard Base64 decoding. This tool automatically detects and handles URL-safe Base64 encoding, making it easy to decode JWT tokens and other URL-safe Base64 strings.

πŸ’‘

Base64 Decoding is Reversible

Base64 encoding and decoding are perfect inverses. Any data encoded to Base64 can be decoded back to its original form without loss. This makes Base64 ideal for transmitting binary data as text, but remember: Base64 is encoding, not encryptionβ€”anyone can decode it.

Why Decode Base64 to JSON?

Common use cases where Base64 decoding reveals JSON data

πŸ”‘

JWT Token Payloads

Decode JWT token payloads to view user claims, permissions, and expiration data. JWT tokens contain Base64-encoded JSON in their payload section, which must be decoded to read the token contents.

🌐

API Responses

Decode Base64-encoded JSON from API responses. Some APIs encode JSON data in Base64 for transmission, requiring decoding to access the actual JSON content.

πŸ”—

Data URIs

Extract JSON data from data URIs embedded in HTML or CSS. Data URIs use Base64 encoding, and this tool can decode the JSON content from strings like data:application/json;base64,...

πŸ”

Authentication Tokens

Decode OAuth tokens, API keys, and authentication strings that contain Base64-encoded JSON metadata. View token contents for debugging and verification.

πŸ“§

Email Attachments

Decode Base64-encoded JSON from email attachments or MIME messages. Email protocols use Base64 encoding, and JSON data may be embedded within.

πŸ—„οΈ

Database Storage

Decode Base64-encoded JSON stored in text database columns. Some databases store binary JSON data as Base64 strings, requiring decoding to access the original JSON.

Base64 Decoding in Numbers

Why developers decode Base64 to access JSON data

-33%
Size Reduction
Base64 decoding reduces size by ~33% (4 chars β†’ 3 bytes)
100%
Lossless
Perfect decoding with zero data loss
Instant
Decoding Speed
Real-time decoding in your browser

How to Decode Base64 to JSON

Three simple steps to convert your Base64 string to readable JSON

1

Paste your Base64 string

Copy your Base64-encoded string from a JWT token payload, API response, data URI, or any Base64 source and paste it into the input field. The tool accepts both standard Base64 (with + and /) and URL-safe Base64 (with - and _). If your string includes a data URI prefix like data:application/json;base64,, the tool can automatically remove it.

Example Base64 from JWT payload:

eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyLCJleHAiOjE1MTYyNDI2MjIsInJvbGVzIjpbImFkbWluIiwidXNlciJdfQ
2

Configure decoding options

Enable auto-detect URL-safe if your Base64 string uses - and _ characters (common in JWT tokens and URLs). This automatically converts URL-safe Base64 to standard Base64 before decoding. Enable auto-remove data URI prefix if your string starts with a data URI prefixβ€”the tool will strip it automatically. Choose your preferred JSON indentation (0, 2, or 4 spaces) for the formatted output.

βœ“ URL-safeAuto-detect
βœ“ Data URIAuto-remove
βœ“ Formatting2-4 spaces
3

Decode and view JSON

Click the Decode to JSON button to convert your Base64 string. The tool uses standard Base64 decoding with UTF-8 support for international characters, ensuring compatibility with all modern systems. The decoded text is validated as JSON syntax, and if valid, it's formatted with proper indentation. The output shows the size change (typically -33% when decoding Base64) and the formatted JSON. Copy the result to your clipboard or download it as a JSON file for immediate use.

Example decoded JSON output:

{
  "sub": "1234567890",
  "name": "John Doe",
  "iat": 1516239022,
  "exp": 1516242622,
  "roles": ["admin", "user"]
}

Ready to read and analyze

Best Practices for Base64 to JSON Decoding

Expert tips for accurate and secure Base64 decoding

βœ“

Enable auto-detect for URL-safe Base64

JWT tokens and many API responses use URL-safe Base64 encoding (with - and _ instead of + and /). Always enable the auto-detect option to automatically convert URL-safe Base64 to standard Base64 before decoding. This prevents "Invalid character" errors and ensures successful decoding.

βœ“

Remove data URI prefixes automatically

If your Base64 string comes from a data URI (starts with "data:application/json;base64,"), enable the auto-remove prefix option. The tool will strip the prefix before decoding, preventing "Invalid character" errors. This is common when decoding Base64 from HTML or CSS data URIs.

βœ“

Validate decoded data as JSON

This tool automatically validates decoded data as JSON syntax. If the Base64 string doesn't contain valid JSON, you'll get a clear error message. Base64 can encode any data (text, images, binary), but this tool specifically validates and formats JSON output.

βœ—

Don't assume all Base64 is JSON

Important: Base64 can encode any data typeβ€”text, images, binary files, XML, CSV, etc. This tool specifically validates and formats JSON output. If you decode Base64 that contains non-JSON data (like an image), you'll get a JSON validation error. Use a general Base64 decoder for non-JSON data.

βœ—

Don't decode sensitive tokens in public

While this tool processes data locally in your browser, be cautious when decoding sensitive authentication tokens or API keys. Even though decoding happens locally, avoid pasting sensitive tokens into any tool if you're on a shared computer or untrusted network.

βœ—

Don't ignore padding errors

Base64 strings must have correct padding (trailing = characters). If you get padding errors, check that your Base64 string is complete and hasn't been truncated. URL-safe Base64 often omits padding, but the tool automatically adds it back when auto-detecting URL-safe encoding.

Base64 to JSON Decoding Methods

Compare different approaches to decoding Base64 strings to JSON

MethodBest ForSetup TimeURL-SafeJSON Validation
Online Tool
FixTools (this page)
Quick decoding, testing, JWT payload viewingInstantβœ“
Auto-detect
βœ“
Built-in
JavaScript atob()
atob(base64)
Browser-based apps, client-side decodingNo setupβœ—
Manual convert
βœ—
Manual parse
Node.js Buffer
Buffer.from(base64, 'base64').toString()
Server-side, CLI scripts, build toolsNode.js installβœ—
Manual convert
βœ—
Manual parse
Python base64
base64.b64decode(base64).decode()
Python scripts, data processing, ETL pipelinesPython installβœ“
urlsafe_b64decode
βœ—
Manual parse
JWT Libraries
jsonwebtoken, jose, etc.
JWT token decoding with signature verificationLibrary installβœ“
Built-in
βœ“
Built-in
Command Line (base64)
echo 'base64' | base64 -d
Shell scripts, CI/CD pipelines, automationPre-installedβœ—
Manual convert
βœ—
Manual parse
πŸ’‘

When to Use This Online Tool

This online decoder is ideal for quick testing, debugging JWT tokens, viewing one-off Base64-encoded JSON, and situations where you need both URL-safe Base64 handling and JSON validation with formatting. It requires zero setup and works entirely in your browser with complete privacy. For production applications with high volume, integrate Base64 decoding directly into your codebase using native libraries.

Frequently Asked Questions

Everything you need to know about Base64 to JSON decoding

How do I decode Base64 to JSON?

Paste your Base64 string into the input field, enable auto-detection options if needed, and click Decode. The tool will decode the Base64 string, validate it as JSON, and format it for easy reading.

What is Base64 decoding?

Base64 decoding converts Base64-encoded strings back to their original format. When decoding Base64 to JSON, the tool first decodes the Base64 string to text, then validates and formats it as JSON.

Does this tool handle URL-safe Base64?

Yes. The tool can auto-detect URL-safe Base64 encoding (which uses - and _ instead of + and /). Enable the auto-detect option to automatically convert URL-safe Base64 to standard Base64 before decoding.

Can I decode JWT tokens with this tool?

Yes. JWT tokens contain Base64-encoded JSON payloads. Paste the Base64-encoded payload section (between the dots) into this tool to decode and view the JSON data. Note: This only decodes the payload, not the full JWT token.

What if the decoded data is not JSON?

If the Base64 string doesn't contain valid JSON data, the tool will show an error. Base64 can encode any data (text, images, binary), but this tool specifically validates and formats the output as JSON.

Is my Base64 data stored on your servers?

No. All decoding happens locally in your browser using JavaScript. Your Base64 data never leaves your device and is not uploaded to any server.

How do I handle data URI prefixes?

If your Base64 string starts with 'data:application/json;base64,', enable the auto-remove prefix option. The tool will automatically strip the prefix before decoding.

Why is my Base64 string invalid?

Base64 strings must only contain A-Z, a-z, 0-9, +, /, and = characters (or - and _ for URL-safe). Invalid characters, incorrect padding, or truncated strings will cause decoding errors.

Can I decode Base64 that contains images?

This tool is specifically for decoding Base64 to JSON. If your Base64 string contains image data or other binary content, it won't be valid JSON and will show an error. Use a general Base64 decoder for non-JSON data.

What's the difference between Base64 decoding and decryption?

Base64 decoding is a reversible encoding processβ€”anyone can decode Base64 instantly. Decryption requires a secret key and is used for security. Base64 is encoding, not encryption. Never use Base64 alone for security.

Does this tool support Unicode characters?

Yes. This tool uses UTF-8 decoding after Base64 decoding, correctly handling emoji, accented characters, Chinese/Japanese text, and all Unicode symbols in the decoded JSON.

Can I use this for production applications?

This tool is perfect for testing, debugging, and one-off decoding. For production apps with high volume, integrate Base64 decoding directly into your codebase using native libraries (Buffer in Node.js, atob in browsers, base64 module in Python) for better performance.

β†’

πŸ“š Master JSON & Data Encoding

Explore tutorials on JWT tokens, API authentication, Base64 encoding/decoding, and web development best practices.

Explore learning center
Free Forever
Interactive
Beginner Friendly

Related JSON Tools

More tools to work with JSON and Base64 data