https://github.com/t1ckbase/file-to-data-uri
A free, fast, vibe-coded client-side tool to convert any file (like images) into a Data URI or Base64 string directly in your browser.
https://github.com/t1ckbase/file-to-data-uri
base64 converter data-uri html image tool vibe-coding vibecoded
Last synced: 4 months ago
JSON representation
A free, fast, vibe-coded client-side tool to convert any file (like images) into a Data URI or Base64 string directly in your browser.
- Host: GitHub
- URL: https://github.com/t1ckbase/file-to-data-uri
- Owner: T1ckbase
- License: wtfpl
- Created: 2025-09-30T13:22:14.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-09-30T13:54:47.000Z (9 months ago)
- Last Synced: 2025-09-30T15:26:33.346Z (9 months ago)
- Topics: base64, converter, data-uri, html, image, tool, vibe-coding, vibecoded
- Language: HTML
- Homepage: https://t1ckbase.github.io/file-to-data-uri/
- Size: 11.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# File to Data URI Converter
> [!WARNING]
> This is vibe-coded
[Site link](https://t1ckbase.github.io/file-to-data-uri/)
A simple, fast, and secure client-side tool to convert any file into its Data URI or Base64 representation. It runs entirely in your browser, meaning your files are never uploaded to a server, ensuring your data remains private.
## ✨ Features
* **100% Client-Side:** All processing is done in your browser using JavaScript. Your files never leave your computer.
* **Drag & Drop:** Easily drop one or multiple files anywhere on the page to start the conversion.
* **Multi-File Support:** Convert multiple files at once, with each result displayed in its own block.
* **Rich File Info:** See the original file name, MIME type, size, and the final Data URI size with the percentage increase.
* **One-Click Copy:** A convenient "Copy" button for each result.
* **Light & Dark Mode:** Automatically adapts to your system's color scheme.
* **Zero Dependencies:** Written in plain HTML, CSS, and JavaScript. No frameworks, no build steps.
## 🤔 Why This Tool?
Many online file-to-Base64 converters require you to upload your files to their servers. This can be slow and poses a significant privacy risk, especially with sensitive data.
This tool was built to provide a fast, secure, and user-friendly alternative that respects your privacy by performing all operations locally. It's a single HTML file that you can run online or save and use offline.
## 🚀 How It Works
The application is built with modern, dependency-free web technologies:
* **FileReader API:** The core of the application, used to read the contents of a user-selected file and encode it as a Data URL (`readAsDataURL`).
* **Drag and Drop API:** Enables the intuitive drag-and-drop functionality for file input.
* **Clipboard API:** Powers the secure, one-click "Copy" functionality (`navigator.clipboard.writeText`).
* **Vanilla JavaScript:** All logic is handled with plain JavaScript for maximum performance and simplicity.