Base64 Repair & Normalizer
Fix broken Base64: strip whitespace, line breaks and invalid characters, convert URL-safe variants, remove data: prefixes and rebuild padding. Output as standard, URL-safe or 76-column MIME.
Input
Output
Repaired Base64
What was fixed
Was this helpful?
More ways to use this tool
REST API
curl -X POST https://api.iotools.cloud/v1/tool/base64-repair \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"inputText": "SGVsbG8g\nV29ybGQ",
"format": "standard"
}'Swap in your own key from your account. The tool's fields are the body — no wrapper.
Ask an AI agent
Use the IOTools `base64-repair` tool (Base64 Repair & Normalizer) on this input:
YOUR_INPUT_HEREPaste this at any agent connected to the IOTools MCP server, then add your input.
Embed widget
<iframe
src="https://iotools.cloud/embed/base64-repair/"
width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
title="Base64 Repair & Normalizer — iotools.cloud"
sandbox="allow-scripts allow-forms allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox"
allow="clipboard-write"
style="width:100%;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden"></iframe>
<script src="https://iotools.cloud/embed.js" async></script>Drop this into your own page — free, no key required, just a link back.
| Cost per API/MCP call | From 5 credits |
|---|---|
| Need more credits? | View pricing |
Also available with
Guides
What does it fix?
- Whitespace, tabs and line breaks pasted in from emails or logs
data:...;base64,prefixes- URL-safe characters (
-_) mixed into standard Base64 - Missing, doubled or misplaced
=padding - Stray invalid characters and a dangling final character
How to use it
- Paste the damaged string.
- Pick an output format: standard, URL-safe or 76-column MIME.
- Copy the repaired value and read the list of what was changed.
Repair is best-effort: if bytes were lost mid-string the result will be valid Base64 but not the original data.
Privacy
Everything runs in your browser; nothing is uploaded.
base64repairfixnormalizepaddingdeveloper