SimplyScan logoSimplyScan
What We ScanPricingFree ToolsBlogCreate AccountLog In
  1. Home
  2. Free Tools
  3. Data URI Generator
Free Tool · Runs in your browser

Free Data URI Generator (File to Base64)

Convert a file or image into a Base64 data URI · ready to inline into HTML, CSS, or JSON. The file is read locally and never uploaded.

100% client-side · nothing you enter is ever sent to a server or stored.

Preview · sign in with a free account to run it

How to use it

  1. Choose File → data URI and pick a file up to 10 MB, or Text → data URI and paste text, HTML, JSON or SVG.
  2. Check or change the MIME type and the encoding.
  3. Copy the data URI into an src, a CSS url() or JSON.

Example

Input

Text → data URI · MIME text/plain
hello world

Result

data:text/plain;charset=utf-8;base64,aGVsbG8gd29ybGQ=

When inlining helps

Small icons and placeholders
Inlining a tiny image saves a request.
Large files
Base64 makes files about a third larger, and inlined data can't be cached separately. Keep big images as normal files.
SVG
SVG can often be inlined as text, without Base64, which is smaller.
Content-Security-Policy
data: URLs must be allowed in the matching directive (usually img-src) or the browser blocks them. Never allow data: in script-src.

Go deeper

  • Why Your AI-Built App Is Slow (And How to Fix It)

Page updated 21 November 2026

Frequently asked questions

When should I inline a file as a data URI?

For tiny assets (under ~4 KB) that block rendering · small icons, inline SVG fallbacks, favicons in single-file pages. Inlining removes a network round-trip but bloats the document by ~33%, so keep it for small files.

Is my file uploaded to convert it?

No · the FileReader API reads the file inside your browser and produces the Base64 string locally. Nothing is transmitted or stored.

Is my file uploaded?

No. The file is read and encoded in your browser and never leaves your device.

Want the full picture?

This tool covers one narrow check. A full SimplyScan runs 60 checks across 14 categories · exposed keys, RLS, XSS, auth, and speed · in 30 seconds.

Run a full security scan

Related tools

Password Generator

Generate strong, cryptographically random passwords · choose the length and character sets, then copy with one click.

UUID Generator

Generate UUID v4 or time-ordered v7 identifiers · single or in bulk · using the browser's cryptographic random source.

API Key Generator

Generate random API keys and secrets · hex, base64url, or alphanumeric, with an optional prefix · straight from your browser's CSPRNG.

SimplyScan logoSimplyScan

Security Scanner for Vibe-Coded Apps.

Product

See What We ScanHow It WorksView Pricing

Resources

Security BlogSecurity ChecklistTrust BadgeUptime MonitoringIntegrationsMCP Server (Claude, Cursor & Windsurf)API DocumentationBackend Audit GuideThreat Detection GuideFAQTerms of ServicePrivacy Policy

Platforms

All platforms →Lovable ScannerBolt.new ScannerCursor ScannerReplit Scannerv0.dev ScannerWindsurf ScannerBubble Scanner

Free Tools

All free tools →SSL CheckerSecurity HeadersDNS Security CheckerCORS TesterJWT DebuggerCSP EvaluatorHash GeneratorSEO Checker

Account

Create AccountLog In

© 2026 SimplyScan. All rights reserved.