About this tool
Switch between "text to Base64", "Base64 to text", or "file to Base64" to get a ready-to-use data URI for any file. Unicode is handled correctly in text mode (emoji and accented characters included). Everything runs locally - nothing is sent to a server - so it is safe for snippets or files you would not want to paste into a random website.
How to use it
- 1 Choose a mode: encode text, decode text, or convert a file.
- 2 Paste your input, or choose a file for file mode.
- 3 The converted result appears in the output box.
- 4 Click "Copy output" to grab it.
Frequently asked questions
Does it handle emoji and accents?
Yes. Encoding uses a UTF-8-safe path, so any Unicode text round-trips correctly.
What happens with invalid Base64 on decode?
You get an "(invalid Base64 input)" message instead of a crash - check for stray characters or missing padding.
Is my data uploaded?
No. The conversion is done entirely in your browser.
What is a data URI used for?
A data URI embeds a small file (an icon, a font, a tiny image) directly inside HTML or CSS instead of a separate request - useful for small assets or quick prototyping.
Embed this tool
Add this free tool to your own website — copy the code below. It stays up to date automatically.
More free tools
Word & Character Counter
Live word, character, sentence and reading-time counts as you type.
Text Case Converter
Convert text to UPPERCASE, lowercase, Title Case, Sentence case, camelCase, snake_case and more.
JSON Formatter & Validator
Pretty-print, minify and check JSON for errors - locally, nothing uploaded.
URL Encoder / Decoder
Percent-encode text for safe use in URLs, or decode an encoded URL back to readable text.
Unit Converter
Convert length, weight, temperature, area, volume, speed, time, pressure, energy and data - instantly, in your browser.
Percentage Calculator
Percent of a number, percent change, discount price, and tip splitting - five common questions in one tool.