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.
Decode JWT token payloads from Base64. Extract and view JSON data from authentication tokens instantly.
Auto-detect and decode URL-safe Base64 strings. Handles - and _ characters automatically.
Everything runs locally in your browser. Your Base64 data never leaves your device.
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.
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.
eyJ1c2VyIjogImpvaG4iLAogInRva2VuIjogImFiYzEyMyJ9
69 bytes (Base64-encoded)
{
"user": "john",
"token": "abc123"
}52 bytes (human-readable JSON)
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 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 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.
Common use cases where Base64 decoding reveals JSON data
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.
Decode Base64-encoded JSON from API responses. Some APIs encode JSON data in Base64 for transmission, requiring decoding to access the actual JSON content.
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,...
Decode OAuth tokens, API keys, and authentication strings that contain Base64-encoded JSON metadata. View token contents for debugging and verification.
Decode Base64-encoded JSON from email attachments or MIME messages. Email protocols use Base64 encoding, and JSON data may be embedded within.
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.
Why developers decode Base64 to access JSON data
Three simple steps to convert your Base64 string to readable JSON
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
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.
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
Expert tips for accurate and secure Base64 decoding
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.
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.
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.
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.
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.
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.
Compare different approaches to decoding Base64 strings to JSON
| Method | Best For | Setup Time | URL-Safe | JSON Validation |
|---|---|---|---|---|
Online Tool FixTools (this page) | Quick decoding, testing, JWT payload viewing | Instant | β Auto-detect | β Built-in |
JavaScript atob() atob(base64) | Browser-based apps, client-side decoding | No setup | β Manual convert | β Manual parse |
Node.js Buffer Buffer.from(base64, 'base64').toString() | Server-side, CLI scripts, build tools | Node.js install | β Manual convert | β Manual parse |
Python base64 base64.b64decode(base64).decode() | Python scripts, data processing, ETL pipelines | Python install | β urlsafe_b64decode | β Manual parse |
JWT Libraries jsonwebtoken, jose, etc. | JWT token decoding with signature verification | Library install | β Built-in | β Built-in |
Command Line (base64) echo 'base64' | base64 -d | Shell scripts, CI/CD pipelines, automation | Pre-installed | β Manual convert | β Manual parse |
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.
Everything you need to know about Base64 to JSON decoding
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.
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.
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.
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.
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.
No. All decoding happens locally in your browser using JavaScript. Your Base64 data never leaves your device and is not uploaded to any server.
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.
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.
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.
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.
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.
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.
Explore tutorials on JWT tokens, API authentication, Base64 encoding/decoding, and web development best practices.
Explore learning centerMore tools to work with JSON and Base64 data
Encode JSON data to Base64 format. Perfect for creating JWT token payloads and API authentication strings.
Beautify and format JSON with proper indentation. Make decoded JSON more readable with consistent formatting.
Validate JSON syntax after decoding. Ensure your decoded Base64 data is correctly formatted JSON.