1 Text or a file 2 processed on your device 3 Base64 + data URI
Base64 & Data URI Encoder
Text
Base64
File to data URI
Data URI
CSS
HTML
01
What it does
Encodes and decodes Base64 with full UTF-8, and turns small files into data URIs with CSS and HTML.
Both directions, live
UTF-8 safe (£, é and emoji)
URL-safe Base64 for tokens and URLs
File to data URI with the right MIME type
02
Private by design
Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.
03
What you get
Base64, a data URI, CSS and HTML, with a Copy and a Download button on every result.
Base64
Data URI
UTF-8
Why it matters
Base64 turns any data into plain text, which is how images get embedded in CSS, how email attachments travel and how many APIs pass tokens. The browser's built-in btoa() breaks on any character outside Latin-1, including £ and emoji.
This encoder handles UTF-8 properly, supports the URL-safe variant used by JWTs, and makes data URIs from files with the right type, plus a warning when a file is too big to be worth inlining.
How it works
InputText or a small file
In your browserUTF-8 bytes encoded, or decoded back
OutputBase64, a data URI and ready CSS or HTML
Where it fits in a designer's workflow
Plan
Design
Build
Test
Launch
Inlining tiny icons, or decoding values in APIs.
By the numbers
Measured with this site's own tool icons: Base64 turns every 3 bytes into 4 characters, plus the data: prefix. That's fine for a small icon, but large files are better as normal files the browser can cache. Source: RFC 4648: Base64.Show the numbers as a table
Icon
SVG
URL-encoded URI
Base64 URI
json.svg
481
548
670
regex.svg
534
607
738
hash.svg
422
489
590
time.svg
515
588
714
uuid.svg
545
618
754
How to use it
For text, type in either box: the other updates.
Tick URL-safe if the result goes in a URL or token.
For a file, open the File tab and choose it.
Copy or download the result.
FAQ
Is Base64 encryption?
No. Anyone can decode it. It's a way of writing data as text, not a way of hiding it.
When should I use a data URI?
For tiny assets, such as small icons under about 4 KB, to save a request. Larger files are better as normal files the browser can cache.
Why is Base64 bigger?
It uses 4 characters for every 3 bytes, so it's about 33% larger than the original.
I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.