Data URL Generator
Convert any file to a Base64 data URI. Useful for embedding files directly in HTML, CSS, or JavaScript.
Upload File
Select a file to convert to data URL
Click to upload or drag and drop
Any file type supported
Data URL
Copy the generated data URL
What is a Data URL?
A Data URL (or Data URI) is a way to embed small files directly into HTML, CSS, or JavaScript code. The file content is encoded as Base64 and included in the URL itself.
data:[mime-type];base64,[base64-encoded-data]
Common use cases:
- Embedding small images directly in HTML/CSS
- Creating self-contained HTML files
- Sending file data via APIs without multipart uploads
- Reducing HTTP requests for tiny resources
Note: Data URLs increase file size by ~33% due to Base64 encoding. Not recommended for large files (>100KB).