Base64 Validator & Repair

Validate, analyze, and repair Base64 strings. Detects invalid characters, checks padding, identifies URL-safe vs standard encoding, and auto-repairs common errors.
All processing happens locally in your browser — your data is never uploaded to any server.
What this tool checks:
• Character set: Valid Base64 characters: A-Z, a-z, 0-9, +, /, = (padding only).
• Length: Base64 strings should be a multiple of 4 characters.
• Padding: Valid = padding (0, 1, or 2 trailing =).
• Format detection: Standard vs URL-safe (-_).
Auto Repair: Removes invalid characters, fixes padding, and normalizes the string.
Why Base64 breaks

Valid Base64 uses exactly 64 characters plus = padding, and its total length must be a multiple of 4. Most broken input is one of three things: whitespace or line breaks pasted along with the data, the URL-safe alphabet that swaps +/ for -_, or a truncated tail that lost its padding.

Repair order matters: strip whitespace first, translate the URL-safe alphabet back, then re-pad with = to a multiple of 4.