Webflags: gi
Data URI
Match base64-encoded data URIs, including the MIME type and the base64 payload.
Try it in RegexProPattern
regexJavaScript
/data:[\w\/+\-.]+(?:;[\w=\-]+)*;base64,[A-Za-z0-9+\/=]+/giRaw source: data:[\w\/+\-.]+(?:;[\w=\-]+)*;base64,[A-Za-z0-9+\/=]+
How it works
Starts with data:, then a MIME type (word chars, slashes, plus, hyphen, dot), optional parameters, then ;base64, and the base64 payload (letters, digits, +, /, =).
Examples
Input
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAMatches
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA
Common use cases
- Inline image extraction from HTML/CSS
- Bundle size auditing
- Asset migration tooling
- Security scanning for embedded payloads