Privacy & processing: Runs in your browser
This tool runs entirely in your browser — your files and text are processed on your device and are not uploaded to our servers.
How to use Base64 Encoder / Decoder
- Step 1
Choose an Encoding or Decoding Task
Open Encode, Decode, File to Base64, Data URI, JWT Decoder, Convert Hub or Analyzer. Paste text or an encoded string, or choose a local file for binary conversion. Avoid pasting production credentials unnecessarily.
- Step 2
Select the Correct Variant and Inspect Output
Use standard Base64 for ordinary interchange, URL-safe for tokens or URL components, and MIME where line-wrapped email formatting is required. Review the output, detected file type, validation messages or JWT claims before use.
- Step 3
Copy, Download or Rebuild the Result
Copy the Base64 string, Data URI or snippet; download encoded text; or reconstruct the original bytes as a file when decoding binary data. Test the result in the destination application before publishing or sharing it.
Key features
Encode and Decode Unicode Text
Convert readable text to Base64 and back using UTF-8 bytes, including accented letters, emoji and non-Latin scripts. The conversion is reversible when the original bytes and proper character encoding are preserved.
Convert Files and Images to Base64
Select local images, PDFs and other binary files, encode their bytes and rebuild files from valid Base64. Browser memory and file size can affect performance.
Build Data URIs and Snippets
Create data: URLs with MIME types and ready-to-copy HTML image or CSS background snippets. Choose small assets carefully; inlining large files increases document size.
Decode JWT Headers and Payloads
Read Base64URL-encoded JWT header and payload JSON, inspect common claims and interpret timestamps. Decoding does not verify cryptographic signatures or token authenticity.
Validate Base64 Strings
Identify invalid characters, unexpected padding, truncated input and variant mismatches. Normalization can help with whitespace or omitted padding but cannot reconstruct missing source bytes.
Switch Between Common Encodings
Translate Base64 data into hexadecimal and binary displays, or move in the reverse direction. Compare byte representations without confusing them with encryption.
Analyze Encoded Content
Inspect likely formats, encoded length, padding, possible JSON/XML and common file signatures. Format detection provides hints rather than a guarantee that the bytes are safe.
Use Standard, URL-Safe and MIME Formats
Choose the alphabet and line-wrapping rules that your API, email or application expects. Standard and URL-safe strings are not interchangeable in every strict decoder.
Copy and Download Results
Copy text outputs or download reconstructed files for development, debugging and offline use. Verify filenames, extensions and target-system requirements.
Understand Privacy and Security Boundaries
The live tool describes local browser processing for its conversion actions. Base64 itself offers no confidentiality, and users must protect sensitive input on shared devices.
What Is Base64 Encoding and Why Do Developers Use It?
Base64 is a binary-to-text representation designed to carry arbitrary bytes through systems that expect printable characters. Instead of displaying raw file bytes or control characters, an encoder translates the bytes into letters, numbers and two punctuation symbols. A decoder maps those symbols back to bytes. The original content can be reconstructed accurately if the encoded string is complete and the decoding rules are correct.
MyToolSpace Base64 Encoder / Decoder brings text encoding, binary file conversion, Data URI creation, JWT inspection, encoding comparison and string analysis into one online workspace. It is useful when API payloads, configuration files, emails or browser documents need a text representation of binary information. The tool supports standard, URL-safe and MIME styles, each of which is meant for a slightly different transport context.
Base64 must not be mistaken for encryption, hashing or compression. Anyone with the string can decode it without a key; the result typically takes more bytes than the original. The purpose is compatibility, not secrecy or speed. Use it when text transport is required, and prefer a normal binary upload when the system can already transfer files safely and efficiently.
Binary-to-Text Conversion: Represent bytes using widely supported printable characters for text-oriented transports.
Fully Reversible: Decode the payload back to original bytes when the input has not been changed.
Not a Security Control: Encoding does not conceal passwords, API keys, documents or JWT claims.
Transport Overhead: Standard padded Base64 uses four output characters for each three-byte block.
How Base64 Works: Six-Bit Groups, Alphabets and Padding
Base64 processes input as bytes and joins three consecutive bytes into a 24-bit block. That block becomes four six-bit values, each indexing one of 64 characters. For example, the UTF-8 bytes for Cat encode to Q2F0. The letters of the output are not an encryption key or a checksum; they represent the source bits using a different textual alphabet.
When the byte count is not divisible by three, the last block is short. Standard Base64 uses one or two equals signs as padding so the final four-character group has the required shape. An empty byte sequence produces an empty encoded value. The equals sign is a marker, not one of the 64 alphabet symbols, and strict decoders may reject padding in the wrong position.
The raw Base64 text length for n bytes is four times the ceiling of n divided by three, excluding line wrapping and Data URI prefixes. Three input bytes therefore become four output characters, although the percentage increase for very small inputs varies with padding. MIME wrapping adds line breaks. Comparing counts in characters and bytes matters whenever the result includes UTF-8 or other multibyte text.
Three Bytes Become Four Characters: Every complete 24-bit source block maps to four printable Base64 characters.
Padding Depends on Length: One trailing byte usually needs two equals signs; two trailing bytes need one.
Length Is Predictable: For standard padded output, the length follows 4 × ceil(number of bytes ÷ 3).
MIME Adds Line Breaks: Email-style output may include CRLF separators after groups of encoded characters.
Text to Base64: UTF-8, Unicode and Round-Trip Accuracy
Text and bytes are related but not identical. A browser string stores characters, while Base64 operates on bytes. Before encoding text such as café, नमस्ते, مرحبا or an emoji, the tool converts characters to UTF-8 bytes. After decoding, those bytes can be interpreted again as UTF-8 text. This preserves characters that are not part of the basic ASCII range.
A common programming mistake is to call a single-byte browser encoding function directly on an arbitrary Unicode string. Some implementations raise an error or produce the wrong bytes. Use a UTF-8-aware method such as TextEncoder and TextDecoder in JavaScript, and ensure both sender and receiver agree on the character encoding. A valid Base64 sequence may represent bytes that are not valid UTF-8; that is normal for binary files.
For testing, encode a sentence with punctuation, an accent and a non-Latin character, decode it, and compare the result with the original. If the output contains replacement symbols, question marks or mojibake, inspect the byte-to-text decoding stage before blaming Base64 itself. If the original content was encoded in a legacy character set, UTF-8 decoding alone may not reproduce the intended text.
Unicode-Safe Workflow: Encode characters to UTF-8 bytes before producing Base64 symbols.
Binary Is Not Necessarily Text: A decodable string may contain an image, compressed archive or arbitrary bytes.
Round-Trip Test: Decode a known sample and compare its exact characters or bytes.
Encoding Agreement: Sender and receiver should agree on UTF-8 or another declared character encoding.
Standard Base64 vs Base64URL vs MIME Base64
Standard Base64 uses A–Z, a–z, 0–9, plus and slash with optional or required equals-sign padding depending on the consuming specification. Base64URL substitutes minus and underscore for plus and slash, which are troublesome in some URL contexts. Base64URL is common in JWT segments and APIs that require URL-friendly text. Its padding is often omitted under the format rules, but consumers can still enforce their own expectations.
MIME Base64 is the email-oriented variant. Encoded lines are commonly limited to 76 characters and separated using CRLF, making the content appropriate for MIME transfer encoding. Those line breaks are presentation and transport formatting, not part of the original file. A strict decoder for a simple API parameter may reject them, so use the format requested by the receiving service.
Select a variant deliberately rather than assuming every Base64-looking string will work everywhere. When a value is embedded in a URL query, understand the difference between converting to Base64URL and applying percent-encoding to a string. Similarly, HTTP Basic Authentication uses standard Base64 for the credential byte sequence and must be protected in transit with HTTPS.
Standard: Common binary-to-text representation for JSON fields and configuration values.
URL-Safe: Substitutes the two URL-problematic alphabet characters; common for JWTs.
MIME: Adds mail-friendly line wrapping for messages and attachments.
Strict Interoperability: Follow the exact alphabet, padding and whitespace expectations of your target.
Image to Base64 and File to Base64: When It Helps
The File to Base64 workflow reads local file bytes rather than treating a document as ordinary prose. This allows an image, PDF, archive, audio sample or other binary file to be represented as a string. The tool can then decode valid input and rebuild a downloadable file. For images, a preview may help users verify that the decoded content is what they intended to handle.
File signatures, sometimes called magic bytes, can provide a clue about a reconstructed file type. However, signatures can be missing, misleading or too short to establish everything about a file. An inferred extension or MIME type is a convenience for the download workflow, not a security validation of the file contents. Never run or open untrusted downloaded files solely because a decoder recognized a familiar signature.
Converting a large image or video into Base64 creates memory usage and transfer overhead. For API integrations, consider multipart/form-data, direct object-storage uploads or pre-signed links instead of placing large Base64 blobs inside JSON. If your system requires Base64 anyway, measure the encoded size and respect request limits. Keep a known original file for checking reconstructed output.
Images and Documents: Encode the actual file bytes, not the filename or visual appearance.
Reconstruction: A valid complete encoded payload can be converted back to the original bytes.
Format Detection: Magic numbers can suggest a type but cannot guarantee safety or validity.
Large-File Trade-Off: Binary upload methods are often more efficient than in-memory Base64 strings.
Data URI Generator for HTML, CSS and Self-Contained Assets
A Data URI packages data inside a URL-shaped string. A Base64-backed example begins with data:image/png;base64, followed by the encoded bytes. The media type indicates how the browser should interpret the content, while the base64 marker describes its representation. MyToolSpace can create Data URIs and copy-ready HTML image and CSS background-image snippets for supported use cases.
Inline images are useful for small icons, demonstration pages, limited offline assets and self-contained HTML documents. They remove a separate network request, but they also grow the document and prevent independent caching of the embedded resource. Repeating the same long Data URI in many places adds duplicate source bytes and can make debugging difficult. For most medium and large images, a normal file URL is easier to optimize and cache.
Check the declared MIME type, quote handling and destination context. Content Security Policy may restrict data: URLs, and not every HTML element or browser context accepts every media type. An SVG is particularly sensitive because it can contain active content depending on the embedding context. Test the generated snippet in the final website or email client rather than assuming a local preview proves cross-platform compatibility.
Small Inline Assets: Useful when eliminating a separate request is worth the larger markup.
Correct MIME Type: Use an accurate media type such as image/png or image/svg+xml.
CSS and HTML Snippets: Paste generated snippets into the correct quoting and escaping context.
Content Security Policy: A site may block data: URLs unless the relevant directive allows them.
JWT Decoder: Read Claims Without Mistaking Them for Proof
A conventional signed JWT has three period-separated components: header, payload and signature. The first two components usually contain Base64URL-encoded JSON. The JWT Decoder view can display those readable objects and interpret common claims such as exp, iat and nbf. Developers use this to debug audience information, token timing and mismatched claim names.
Reading a JWT payload is not the same as trusting it. The signature is a cryptographic integrity and authenticity mechanism that must be verified with an appropriate secret or public key under a secure implementation. MyToolSpace describes its JWT feature as decode-only. It does not verify a signing key, prove who issued the token or establish that a payload has not been modified.
Timestamp fields can be interpreted as seconds since the Unix epoch, but the meaning of exp or nbf also depends on clock accuracy and server validation rules. A token that appears unexpired is not automatically valid: it may be revoked, intended for another audience, signed by an untrusted issuer or malformed. Avoid sharing live bearer tokens in tickets, screenshots or public forums.
Header and Payload: Readable claims support debugging, not authorization decisions.
Expiration Clues: Inspect exp, iat and nbf with appropriate timezone interpretation.
No Signature Verification: Decoding alone cannot establish authenticity or integrity.
Sensitive Tokens: Prefer synthetic or revoked examples for demonstrations and screenshots.
Base64 Validator, Padding Repair and Encoded-String Analysis
A Base64-looking string may be invalid because of a stray character, copied quotation mark, wrong alphabet, truncated payload or misplaced equals sign. It may also include harmless whitespace inserted by an email client or formatting tool. Validation should separate recoverable formatting issues from missing or corrupted byte data. Merely forcing an invalid string through a permissive decoder can conceal the real problem.
For standard padded Base64, the length should be divisible by four, although some specifications accept unpadded values. If a string has been copied without trailing padding, normalizing that padding may be sufficient. A string whose effective length leaves exactly one leftover Base64 character cannot represent a complete final byte sequence. Missing middle characters, on the other hand, cannot be restored simply by appending equals signs.
The Analyzer can help assess string length, estimated decoded size, padding and likely content patterns, including possible encoded JSON, XML, binary or JWT structure. These findings should be interpreted as heuristics. A correctly decoded string could still contain unsafe markup, a malicious executable, unsupported character encoding or intentionally misleading data.
Check the Alphabet: Standard and URL-safe symbols differ in two positions.
Inspect Padding: A missing equals sign may be fixable; lost payload characters are not.
Remove Copy Noise: Whitespace and pasted formatting can disturb strict decoding.
Treat Output as Untrusted: Validation of Base64 syntax does not certify the decoded content.
Security, Privacy and Safe Handling of Encoded Content
The MyToolSpace page describes Base64 conversion as browser-based and states that entered material is processed locally. This is valuable for limiting unnecessary server transfers during the conversion itself. Nevertheless, do not infer that an entire device or browsing session is immune to browser extensions, clipboard monitoring, shoulder surfing, local malware or accidental sharing. Check organizational policies before processing regulated or highly confidential records.
Base64 encodes bytes without a secret. It should not be used for storing passwords, obscuring API credentials, protecting personal records or creating secure links. Use standard cryptographic techniques when confidentiality, authenticity or password storage is the actual requirement. For passwords, a suitable password hashing function such as Argon2id is different from reversible encoding.
Decoded content may be dangerous independently of the conversion operation. A file may be executable or contain malicious macros, and decoded HTML or SVG must not automatically be injected into a privileged web page. JWT payloads can include private attributes even if the token uses an otherwise familiar structure. Review outputs before forwarding them or saving them in public repositories.
Local Conversion Is Not Encryption: The encoded result remains readable to anyone with access to it.
Guard the Clipboard: Copy actions may leave sensitive strings available to other software or users.
Do Not Execute Unknown Files: Recognized signatures do not imply a reconstructed file is trustworthy.
Minimize Exposure: Prefer fictional test tokens and non-sensitive sample files for demos.
Choose the right Base64 format for your destination
Use Standard Base64 when an API expects the ordinary alphabet and padding. Use Base64URL for a destination that specifies URL-safe characters, such as a JWT segment. Use MIME wrapping only when the receiving format requires line breaks.
For images and files, check whether the destination expects raw Base64 or a complete data URI. Decode a small sample back to bytes to check the result. For large files, compare binary upload support before embedding a much larger text representation.
Base64 Format and Variant Comparison
Use the destination system’s specified alphabet and line wrapping.
| Alphabet or structure | Typical usage | Important limitation | |
|---|---|---|---|
| Standard Base64 | A–Z, a–z, 0–9, + and / | JSON binary fields, general transport | Padding and whitespace rules vary by consumer |
| Base64URL | A–Z, a–z, 0–9, - and _ | Tokens and URL-safe applications | Usually unpadded; strict consumers can vary |
| MIME Base64 | Standard alphabet with line wrapping | Email transfer encoding | CRLF line breaks may be rejected by API parsers |
| Data URI | data:[mime];base64,[payload] | Inline HTML or CSS assets | The prefix is not part of raw Base64 |
| JWT segments | Base64URL header and payload | Reading conventional signed JWT content | Decoding is not signature verification |
Binary Encoding Size and Practical Trade-Offs
Approximate character counts for a complete three-byte block; real totals depend on padding and metadata.
| Text representation for 3 bytes | Primary advantage | Trade-off | |
|---|---|---|---|
| Binary | 24 binary digits | Exposes individual bits | Very long as text |
| Hexadecimal | 6 hex digits | Human-friendly byte inspection | About twice the source byte count |
| Base64 | 4 Base64 characters | Compact printable binary transport | Roughly one-third size overhead |
| URL percent encoding | Variable length | Safe for URL components | Overhead depends on escaped characters |
| Raw binary | 3 bytes | No encoding expansion | Requires binary-capable transport |
Which Base64 Workflow Should You Use?
Select the simplest compatible action rather than encoding everything automatically.
| Choose this action | Check before use | |
|---|---|---|
| Readable sentence | Encode text to Base64 using UTF-8 | Decode back to check Unicode characters |
| PNG or JPG image | File to Base64 or Data URI | Use correct media type and assess encoded size |
| PDF document | File to Base64 | Confirm API or storage limits |
| JWT | JWT Decoder | Header and payload are not authenticated |
| Inline icon | Data URI generator | Confirm CSP and browser support |
| Binary in JSON API | Standard Base64 if specified | Remove Data URI prefix unless requested |
| Email attachment | MIME encoding | Observe line wrap conventions |
| URL parameter | Base64URL or appropriate URL escaping | Follow destination protocol exactly |
Common Base64 Input Problems
Use symptoms to distinguish simple normalization from missing information.
| Likely reason | Recommended check | |
|---|---|---|
| Invalid symbol | Characters outside the permitted alphabet | Remove accidental punctuation; check original |
| Wrong alphabet | Standard and URL-safe characters mixed | Use the expected variant |
| Missing padding | Trailing equals signs omitted | Normalize only if the format permits it |
| Truncated payload | Encoded characters lost from the middle | Recover the original source; padding will not fix it |
| Unreadable text | Decoded bytes are not UTF-8 text | Treat as binary or check source encoding |
| Wrong file extension | MIME/type inference uncertain | Verify bytes with the original format specification |
| Unexpected large output | Base64 expansion and prefixes | Measure payload; consider binary transfer |
| JWT appears invalid | Incorrect segments or altered contents | Check structure and verify signature in the application |
Common use cases
Frontend Developers
Embed a small icon as a Data URI, inspect a Base64 data field in a response, or validate a URL-safe token segment. Check caching and CSP effects before shipping inlined assets.
Backend and API Engineers
Convert a small binary response to a Base64 JSON field, test precise payload bytes and troubleshoot unexpected decoding errors across services.
Designers and UI Builders
Generate sample image Data URIs for HTML or CSS demos. Compare a small embedded asset with a separately hosted image before selecting the production approach.
Students and Educators
Demonstrate byte grouping, six-bit indexes, padding and Unicode round trips. Compare Base64, hex and binary using known samples.
Security Reviewers
Inspect suspicious Base64 wrapping and read JWT claim fields during authorized debugging. Do not assume encoded content is safe or cryptographically verified.
Email and Messaging Developers
Understand MIME line wrapping and inspect an encoded attachment used by a message pipeline. Confirm boundaries and transport headers in addition to the Base64 data.
Documentation Writers
Show reproducible Base64 examples and clean Data URI snippets in tutorials. Use fictional input so published examples do not leak private data.
Data Integration Teams
Map small encoded files or certificates between systems that expose only text fields, while keeping size and authentication limits in mind.
QA and Test Engineers
Round-trip files and UTF-8 strings, test malformed padding and confirm expected outcomes for standard versus URL-safe Base64 integrations.
Practical tips
Encode Bytes, Not Just Characters
For arbitrary Unicode, convert text to UTF-8 before Base64. For images and PDFs, use actual file bytes rather than copying a filename into the text encoder.
Match the Destination Alphabet
Use Base64URL only when the consuming format expects minus and underscore. APIs may reject standard plus and slash or stripped padding.
Protect Live Tokens
Use synthetic JWTs for screenshots and help requests. A decoded payload may reveal account details, and a copied bearer token can grant access while it remains valid.
Never Treat Base64 as Encryption
Use TLS and appropriate encryption or secure storage for confidential information. Encoding with Base64 provides no key-based secrecy.
Test a Complete Round Trip
Encode a representative sample, decode it and compare it with the original. A file hash can provide stronger byte-for-byte confirmation.
Avoid Huge Data URIs
Inline small icons selectively. Large Data URIs increase source size, prevent separate cache reuse and can slow debugging.
Use MIME Wrapping Only When Needed
Line-wrapped output is useful for email, but an API field often expects a continuous Base64 string without CRLF separators.
Handle Unknown Decoded Files Carefully
Do not automatically open executable or macro-enabled content from untrusted strings. Inspect metadata and scan files through appropriate security controls.
Check Padding Before Repair
Trailing equals signs may be regenerated in supported formats, but missing interior symbols cannot be recovered by a padding change.
Confirm JWT Signatures Elsewhere
This tool reads header and payload data. Authorization systems must separately verify signatures, issuers, audiences, expiry and any revocation rules.
Keep Sensitive Data out of Logs
Even if conversion runs locally, copied output can enter browser history, screenshots, issue trackers, logs or external API requests.
Choose Binary Upload for Large Files
For sizable assets prefer multipart uploads or direct object-storage transfer unless a receiving specification requires Base64.
Frequently asked questions
What is a Base64 encoder?
A Base64 encoder represents arbitrary bytes as printable text using a 64-character alphabet. It is useful when transporting binary through text-oriented formats such as JSON or MIME email. It is reversible and does not provide confidentiality.
How do I encode text to Base64 online?
Open the Encode view, type or paste your text, choose standard, URL-safe or MIME output as required, and copy or download the encoded string. The tool uses UTF-8 for Unicode input.
How do I decode a Base64 string?
Paste the string in the Decode view, check whether it is standard or URL-safe, and inspect the resulting text or binary output. Avoid assuming arbitrary decoded bytes will be readable text.
Does Base64 encryption protect my data?
No. Base64 is a public encoding scheme that anyone can reverse without a secret. Use encryption for confidentiality and a secure password hashing algorithm for password storage.
Can I encode Hindi, Arabic, Chinese or emoji text?
Yes, UTF-8 can represent those characters before Base64 conversion. Round-trip the result and ensure the destination also decodes the same UTF-8 bytes.
Why does Base64 output end with an equals sign?
Padding makes a standard output length a multiple of four characters. One or two equals signs can represent an incomplete final source block. URL-safe formats often omit padding.
How much does Base64 increase file size?
Complete groups of three input bytes become four output characters, yielding approximately 33 percent overhead for large inputs. Small inputs, MIME line breaks and Data URI prefixes alter the exact percentage.
What is the difference between Base64 and Base64URL?
Base64URL replaces plus with minus and slash with underscore, and commonly omits equals-sign padding. It is designed for URL-friendly transport and is used in JWT segments.
What is MIME Base64?
MIME Base64 applies email transfer-encoding conventions, including line wrapping at 76 characters with CRLF. Those breaks are not suitable for every API field.
Can I convert a JPG or PNG image to Base64?
Yes. Use the File to Base64 view to read image bytes and obtain an encoded string. The Data URI view can produce an embeddable string with an appropriate media type.
Can I convert Base64 back to a PNG or another file?
Valid complete Base64 can be decoded back to its byte sequence. The tool can reconstruct a downloadable file and may infer a format from recognizable signatures. Verify uncertain file types independently.
Is a Data URI the same as raw Base64?
No. A Data URI typically includes a data: prefix, MIME type and base64 marker before the payload. Some APIs accept raw encoded bytes but reject a full Data URI.
Can I decode a JWT token online?
The JWT view decodes conventional Base64URL header and payload segments and displays common claims. It does not verify the signature or establish that the token is authentic.
Does the JWT decoder verify a token signature?
No. Signature validation requires a trusted key and an appropriate cryptographic verification process in the application. A readable header and payload alone do not establish token validity.
What do exp, iat and nbf mean in JWTs?
They commonly represent expiration, issued-at and not-before times, often as numeric dates in seconds since the Unix epoch. Applications must still validate signature, issuer, audience and other constraints.
Can I inspect a Base64 string that contains JSON?
Yes. A Base64 payload that decodes into valid UTF-8 JSON can be inspected as text and formatted where the interface supports it. Not all encoded strings are JSON.
Can I convert Base64 to hexadecimal?
Yes, the conversion workspace can represent the decoded bytes as hexadecimal. Hex uses two printable digits per byte and is useful for inspecting signatures and hashes.
Why is my Base64 string invalid?
It may contain illegal characters, mismatched alphabets, misplaced padding, truncated content or copied formatting marks. Use validation feedback to identify the problem before decoding.
Can the tool repair missing Base64 padding?
The tool describes normalization for missing trailing padding. Padding correction may restore an otherwise complete payload, but it cannot recover encoded characters lost from the middle.
What happens if my Base64 decodes to unreadable symbols?
The payload may contain binary rather than text, or its text encoding may differ from UTF-8. Check expected file type and source character encoding.
Does the tool upload files to a server?
The live page states that the conversion work occurs in the browser without file uploads. Still follow your own confidentiality policy and consider browser extensions, local devices and where you subsequently copy or send the output.
Can I use Base64 for HTTP Basic Authentication?
Basic authentication encodes the username:password bytes in Base64. It does not encrypt them; HTTPS and sound credential-handling controls remain necessary.
Can I share a Base64 string as a secure secret link?
Not as a security measure. Anyone receiving the string can decode it. Access controls, signed expiring links or encryption should be used where secrecy or authorization matters.
How can I verify a decoded file is identical to its source?
Compare file size and use a cryptographic hash computed from both original and reconstructed byte streams. A matching hash provides stronger assurance than matching filenames or preview thumbnails.
Can this tool decode every encoded or encrypted string?
No. Base64 decoding only applies to the correct alphabet and structure. Encrypted data, compressed files, hashes and unrelated encodings cannot all become readable text merely by decoding as Base64.
Troubleshooting
| Problem | Likely cause | What to do |
|---|---|---|
| Encoded output looks different from another website | The sites may be using different input character sets, URL-safe alphabets or MIME wrapping. | Compare the exact source bytes and variant settings. Test a short known UTF-8 sample and avoid comparing a raw Data URI with a plain Base64 payload. |
| Unicode text becomes question marks after decoding | The input or output was interpreted with an incompatible character encoding, or the original text already contained replacement characters. | Encode UTF-8 bytes and decode as UTF-8. Check the text in the source application before re-encoding. |
| Decoder reports invalid characters | The string contains punctuation, smart quotes, unexpected symbols or mixed alphabets. | Paste the original data without surrounding quotation marks, inspect the reported character and select the appropriate Base64 variant. |
| Base64 padding appears incorrect | One or more trailing equals signs may have been removed or inserted, or the payload is truncated. | Use validation to check the expected length. Normalize only permitted trailing padding; retrieve the original if encoded characters are missing. |
| URL parameter breaks after encoding | Standard Base64 may include plus, slash or equals characters that require special handling in URLs. | Use Base64URL when the protocol accepts it, or apply correct URL-component encoding under the destination contract. |
| Decoded data is not readable text | The source is binary, compressed data or text in an unknown character set. | Use the file reconstruction workflow or inspect hex bytes. Do not assume every valid Base64 result contains UTF-8 prose. |
| Image preview cannot be displayed | The media type may be wrong, the bytes may be incomplete or the image format may be unsupported by the browser. | Decode to a file, verify its signature and size, and open it with a suitable trusted viewer. |
| Reconstructed file downloads with a strange extension | File signatures can be ambiguous, absent or inconsistent with provided metadata. | Compare with the source format and set an appropriate extension only after validating the file contents. |
| The destination API rejects a Data URI | The API may expect only Base64 characters and not the data: prefix or MIME information. | Consult the API specification and send only the payload or the exact documented field structure. |
| Data URI does not render in HTML or CSS | The MIME type, quoting, escaping or Content Security Policy may not match the embed context. | Check the generated snippet, element support and CSP. Test with a small known-good asset before embedding larger content. |
| JWT decoder cannot parse a token | The string may be incomplete, not in a conventional JWT format or have invalid Base64URL JSON segments. | Check segment count and copied characters. Use a representative valid token; do not publish production access tokens while troubleshooting. |
| JWT expiry indicator differs from the application | The application may check server time, issuer, audience, revocation or policy rules beyond the visible timestamp. | Treat expiry display as an informational clue and debug signature and claim validation in the application server. |
| JWT payload looks valid but authentication fails | Reading Base64URL claims does not verify signature authenticity, authorization or audience. | Check trusted signature verification, iss, aud, exp, nbf, scopes and revocation on the server. |
| Hex to Base64 conversion fails | The hexadecimal string may have an odd number of digits, invalid letters or unexpected separators. | Remove unsupported decorations, ensure valid pairs of hexadecimal digits and compare known input bytes. |
| Output size is much larger than expected | Base64 expands data and optional Data URI prefixes or MIME wrapping add more characters. | Compare decoded byte count with encoded character count. For large data choose binary transfer where possible. |
| Copy or download does not work | Browser clipboard permissions, file policies or temporary restrictions can block the action. | Try direct selection and manual copy, check browser permissions and repeat the operation in a supported browser. |
| Encoded JSON cannot be parsed after decoding | The decoded bytes may be non-JSON, incorrectly encoded or only a fragment of a document. | Review the readable text as plain text first and validate its JSON syntax separately. |
| A decoded file triggers a malware warning | The content may be unsafe or contain active code independently of how it was encoded. | Do not bypass the warning. Quarantine or discard untrusted files and follow organizational security procedures. |
| Encoding works on desktop but not mobile | Mobile memory, file picker and clipboard capabilities differ by browser and OS. | Try a smaller file and verify supported permissions, or use a desktop browser for large file workflows. |
Developer Tools
Explore More Tools
Go ad-free & unlock more
- Zero ads, faster focused workflow
- Unlimited history & saved presets
- Batch processing & exports