How to use the Base64 Standard Detector tool
- Paste the encoded value into the Base64 or Base64 data URL box, or select Example to load a sample.
- Select Detect format to analyze the string.
- Read the Alphabet line: Standard, URL-safe, or Shared by standard Base64 and Base64URL.
- Read the Padding line and the Decoded bytes line, then configure your decoder to match.
The two alphabets a Base64 detector can tell apart
RFC 4648 defines two alphabets that agree on 62 of their 64 characters. Section 4, plain base64, uses + and / for the values 62 and 63. Section 5, base64url, uses - and _ for the same two values so that the output is safe in URLs and file names.
A string therefore reveals its variant only if one of those four characters occurs. The tool reports URL-safe when it finds - or _, Standard when it finds + or /, and Shared by standard Base64 and Base64URL when it finds none. A shared value decodes to the same bytes under both alphabets, so either decoder will do.
Example results
The first value is the encoded sample greeting, which happens to use neither special pair. The second and third are the same seven bytes written in each alphabet, once with padding and once without.
SGVsbG8sIHdvcmxkIQ==
Alphabet: Shared by standard Base64 and Base64URL
Padding: Present
Decoded bytes: 13
PDw/Pz8+Pg==
Alphabet: Standard
Padding: Present
Decoded bytes: 7
PDw_Pz8-Pg
Alphabet: URL-safe
Padding: Not present
Decoded bytes: 7What is checked before the report
The value has to decode before anything is reported, so a malformed string gives the error Enter valid Base64 or Base64URL data and no analysis. Mixing the alphabets, such as + next to _, counts as malformed.
Whitespace is removed and a data URL prefix is cut off first, so wrapped MIME or PEM text is analyzed as one string and line wrapping is not part of the report. The Padding line states what is in the input. A URL-safe string that keeps its = signs is reported as URL-safe with padding present.
Why the variant matters to your decoder
Most libraries make you choose. Go ships four encodings, StdEncoding, URLEncoding and their Raw forms without padding, which map directly onto the two lines of this report. Java separates Base64.getDecoder() from getUrlDecoder(). Python's b64decode raises an Incorrect padding error on unpadded input. JSON Web Tokens require the URL-safe alphabet with padding removed.
When the detected format is not the one your code expects, rewrite the value with Normalize Base64. Keep in mind what detection cannot do: it confirms that the text is well formed, not that an encoder produced it. The word test is valid Base64 for three bytes.
Frequently asked questions
How do I know if a string is Base64 or Base64URL?
Look for the characters that differ. A plus or slash means standard Base64, a hyphen or underscore means Base64URL. The detector performs that check, validates the rest of the string and adds the padding status.
What does Shared by standard Base64 and Base64URL mean?
The string contains only letters and digits, apart from any padding. Those 62 characters have the same values in both alphabets, so the variant cannot be determined and does not affect the decoded bytes.
Can the detector tell whether text is really Base64?
No tool can be certain. It verifies the alphabet, padding and length rules, which many ordinary words and identifiers also satisfy. Treat a positive result as well formed, then judge by context and by what the bytes decode to.
Is padding required in Base64?
RFC 4648 says encoders must pad unless the specification that uses Base64 says otherwise. Many URL-safe uses, including JWT, omit it. A decoder can always work out the missing padding from the string length.
Does it detect MIME or PEM line wrapping?
No. All whitespace is stripped before analysis and is not mentioned in the report. Wrapped input is accepted, and the byte count refers to the data after the line breaks are removed.