Developer Utilities

Base64 Validator

All tools

Paste a suspicious Base64 value and find out whether it is well formed and how many bytes it holds.

How it works

Four simple steps

1

Paste the value

Line breaks and spaces are stripped before any checks run.

2

URL-safe is detected

Strings with - or _ are converted and padded automatically.

3

Read the verdict

See Valid Base64 or the exact reason it failed.

4

Compare the numbers

Length, decoded bytes and padding help spot truncation.

Base64 Validator

About Base64 Validator

A partner's API rejects your payload with 'invalid base64' and the string looks fine at a glance. Somewhere there is a stray character, a lost = sign or a truncated copy. Base64 Validator answers the yes-or-no question and gives you numbers to compare against what was sent.

Validation runs as you type, and whitespace and line breaks are ignored. If the string contains - or _, it is treated as URL-safe and padding is added before checking. A valid string gets a short report: whether URL-safe characters were present, the length, the number of decoded bytes and the padding count. Invalid input produces a specific message, either a bad charset (something outside A to Z, a to z, 0 to 9, +, / and =) or a length that breaks the padding rules.

The decoded byte count is the most useful number when debugging. If you expected a 32-byte key and see 31, the string was cut short. A 16-byte value always encodes to 24 characters ending in two = signs, so lost padding is easy to spot. Once it validates, decode the Base64 to text to read it, or inspect the bytes in hex when the content is binary.

Checks run in the page using the browser's built-in decoder. The value is never sent anywhere, which matters when it is an API secret or signing key.

Keyboard shortcut

Ctrl Enter - Run tool
FAQ

Frequently asked questions

See all FAQs

Answers for this tool. For site-wide help, open the FAQ hub.

Because base64url normally omits padding. The validator converts - and _ back to + and /, adds the missing = characters and then checks the result. The padding count in the report is the number it had to add.

Yes. Validation proves the format, not the content. A string that decodes to the wrong key, a truncated JSON document or text in the wrong encoding will still pass, so compare the decoded byte count with what you expected.

The validator converts URL-safe characters before checking, so a mixed string passes here. Most real decoders reject that mix, though, so seeing both kinds in one value usually means two different encoders touched it.

View more FAQs

Related tools

View all

Cron Calendar

Explain cron expressions and preview the next run times in any timezone.

Open

CSV to SQL

Infer column types and generate CREATE TABLE + INSERT statements from CSV.

Open

SQL Query Builder

Build SELECT queries visually and reverse-parse SQL into a structure tree.

Open

Log Pattern Miner

Cluster log lines into templates, surface anomalies, and mask PII locally.

Open

Explore 321 free tools

Everything you need as a developer, marketer or creator - in one beautiful place.

Browse all tools