Base64 Validator and Repair Tool
Find out why a string won't decode, what file it holds, and get a repaired copy.
Your files are processed on your device and are never uploaded.
Paste any Base64 string and find out whether it is valid – and if it is not, exactly why. The validator checks the string as you type, explains each problem in plain words, tells you what kind of data it contains, and gives you a repaired copy when the problem can be fixed.
How to Check a Base64 String
- Paste the string into the box. A data URI works too.
- Read the report: each check is marked with a green tick, a red cross or an info sign.
- Copy the repaired string if the tool fixed something, or follow the hint to correct the source.
What the Validator Checks
- Data URI prefix: Whether there is a
data:prefix, and which file type it declares. - Whitespace: Line breaks (normal for MIME email, which wraps at 76 characters) and stray spaces.
- Alphabet: Standard (
+and/) or URL-safe base64url (-and_, used in JWTs and URLs). - Invalid characters: Exactly which characters do not belong, such as quotes, backslashes or
%signs from URL encoding. - Length and padding: Valid Base64 divides evenly into groups of 4. The tool spots missing or extra
=signs and strings that have been cut off. - Decoding: Whether the browser can actually decode the result.
- Content: What the decoded data is – plain UTF-8 text, a PNG, JPG or PDF, a ZIP, audio and more.
The Most Common Problems
- Truncated strings: Copying from a log or a terminal often cuts off the end. If the length leaves a remainder of 1 when divided by 4, data is definitely missing – this cannot be repaired, you need the full string.
- JSON escaping: Slashes written as
\/or a trailing"break decoding. Copy only the value. - URL encoding: A string passed in a URL may contain
%2B,%2Fand%3Dinstead of+,/and=. - Spaces instead of plus signs: Some form handlers turn
+into a space.
Next Steps
Once the string is valid, the report links to the right decoder for its content – Base64 to Text, Base64 to Image, Base64 to PDF or Base64 to File.
The check runs entirely in your browser. Strings that contain tokens, keys or personal data are never sent anywhere.
Base64 to Text Base64 to File Base64 to Image Encode / Decode
Frequently Asked Questions
How do I know if a string is valid Base64?
Paste it into the box. Valid Base64 uses only A–Z, a–z, 0–9,
+ and / (or - and _ for URL-safe), has a length divisible by 4 and ends with at most two = signs. The validator checks all of this for you.Can the validator fix my string?
It fixes whitespace, URL-safe characters, data URI prefixes and wrong padding, and gives you the repaired string to copy. It cannot restore data that is missing because the string was cut off.
What does "remainder of 1 when divided by 4" mean?
Base64 always comes in groups of 4 characters, and a final group of just 1 character is impossible. It means part of the string is missing – copy it again from the source.
How can I tell what file a Base64 string contains?
The validator decodes it and recognises the type from its first bytes – text, PNG, JPG, GIF, PDF, ZIP, MP3, MP4 and more.
Is my string sent to a server?
No. Everything is checked in your browser, so tokens and private data stay on your device.
Is Base64 Validator free to use?
Yes. Base64 Validator is completely free, with no sign-up, no watermark and no limit on how many times you use it.
Are my files uploaded to a server?
No. Your files are processed directly in your web browser on your own device. Nothing is uploaded or stored, and the file is gone from memory when you close the tab.